Talula
This is kinda improved version.
Talula
Where your y n works.
Anonymous
Hi
Anonymous
Anonymous
how to enable undefined behaviour during execution in cpp?
Anonymous
Anonymous
g++ -Wall -Werror -pedantic-error fname.cpp
Anonymous
but this didn't work
Anonymous
Anonymous
sorry it shouldn't be the job of compiler to find a UB, I guess at run time.
Anonymous
Anonymous
Use valgrind and profilers
Anonymous
Dynamic analyzers
Anonymous
Not necessarily
Ok, isn't the compiler's job limited before run?
Anonymous
Ilya
Anonymous
I don't understand you
I mean the compiler should just be compiling thing and just that and shouldn't bother what is happening at run time
Anonymous
Anonymous
UB has various forms
And some can't be checked at compile-time
Anonymous
Ilya
Ilya
Ah, GCC...
Ilya
GCC is not the best here, but probably I just don't know
Ilya
Your can try MS VC Debug builds at least, or valgrind on Lin
Artöm
X3eRo0
well i am getting an error while compiling
X3eRo0
undefined reference to SetPixel@16
X3eRo0
i checked my system32 dir
X3eRo0
for gdi32.dll
X3eRo0
any idea?
X3eRo0
using mingw g++ compiler
X3eRo0
SetPixel(hdc, x, y, RGB(127, x, y));
Anonymous
X3eRo0
thanks i will check now
Talula
X3eRo0
Check the documentation
according to https://docs.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-setpixel?redirectedfrom=MSDN
X3eRo0
it looks cool
Tobias🐾🚲
X3eRo0
yeah just saw that
X3eRo0
😂
X3eRo0
i want to like print pixels to my app based on the xy coordinates
X3eRo0
so
X3eRo0
can you guys suggest a better way
Anonymous
Can someone tell me how can I replace a word with another word in a file using command line argument
Dima
Anonymous
Isn't helping
Dima
It should
X3eRo0
hey
Anonymous
Helllloo
X3eRo0
pls suggest me a good way to draw pixels in a win32 gui application
Anonymous
#googleit
X3eRo0
like
Anonymous
Write a c++ program using command line argument to search for a word in a file and replace it with another word .
X3eRo0
i am modifying a 256*256 array of integers
Tobias🐾🚲
X3eRo0
and i want to print those integers as colors like rgb (black-white) as each integer will be some color between black and white
Dima
Dima
Lol
Dima
bingo
X3eRo0
and the position of the color is the position of the color in the array
Tobias🐾🚲
Tobias🐾🚲
Are you just doing rand() over it and want a pixel result from it?
X3eRo0
so is there any other way to do it without setpixel()
X3eRo0
Tobias🐾🚲
X3eRo0
colors[256][256] = {0,0,0,0,256,256,256,256......}
Tobias🐾🚲
Tobias🐾🚲
X3eRo0
Anonymous
OK so how do I develop AI using c++