I write the following macro for debug convinience,
1 #ifndef DEF_H 2 #define DEF_H 3 #define DEBUG_MODE 4 #define DEBUG_INFO(message) \\ 5 #ifdef
You cannot have #ifdefs inside a macro definition. You need to turn it inside out:
#ifdef
#ifdef DEBUG_MODE #define DEBUG_INFO(message) cout << (message) << endl #else #define DEBUG_INFO(message) #endif