Possible Duplicate:
#ifdef inside #define
How do I use the character “#” successfully inside a Macro? It screams when I do something like that:
#define DO(WHAT) \
#ifdef DEBUG \
MyObj->WHAT() \
#endif \
You can’t do that. You have to do something like this:
The
do { } while(0)avoids empty statements. See this question, for example.