Someone tell me how come can't I pass an 'int' to the MessageBox()'s 2nd parameter??
Someone tell me how come can't I pass an 'int' to the MessageBox()'s 2nd parameter??
what does signature stand for?
Is that a trick question? Because it takes a char* numbskull! j/k
Here, add this to your toolbox:
Code:int Alert(int style, const char * message, ...) { char output[strlen(message) + 1024]; va_list p; va_start(p, message); vsprintf(output, message, p); return MessageBox(NULL, "Notification: ", output, style); } int Alert(const char * message, ...) { char output[strlen(message) + 1024]; va_list p; va_start(p, message); vsprintf(output, message, p); return MessageBox(NULL, "Notification: ", output, MB_OK); }
Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }
because it wants a LPCSTR..how come can't I pass an 'int' to the MessageBox()'s 2nd parameter
use itoa() to convert the integer to a char* string first and then pass it..
/btq
...viewlexx - julie lexx