Hi, why doesn't this code work:
int main()
{
cout << "Hi!\n";
#ifdef DEBUG
cout << "I'm in debug mode!\n";
#endif
return 0;
}
I am trying to make the message "I'm in debug mode!" only print when I am in debug mode for my IDE (Visual C++). But also, I want this to work with most compilers. Is there any way to do this?