Hi, I'm trying to do a debug system but it seems not to work.
What I wanted to accomplish is something like this:
#ifndef DEBUG
#define printd //
#else
#define printd printf
#endif
Is there a way to do that? I have lots of debug messages and I won't like to do:
if (DEBUG)
printf(...)
code
if (DEBUG)
printf(...)
...
EDIT: I chose AndreyT's answer as it is the direct answer to my question, regarding what I'm doing instead of #defining a comment is explained by Tim's and Xeor's answers.