T
The D0ct0r
Hey,
please consider the following:
#if DEBUG
#define SOMEMACRO(type, name, value) (type) (name) = (value)
#else
#define SOMEMACRO(type, name, value) #define (name) (value)
#endif
If I define DEBUGging, i want the variable (name) to be a variable, but
if not, I want it to be a constant. When I compile this, the preprocessor
starts complaining at the fourth line, because of the second #define. Is
this OT here? And if not, how should I solve this?
the d0ct0r
please consider the following:
#if DEBUG
#define SOMEMACRO(type, name, value) (type) (name) = (value)
#else
#define SOMEMACRO(type, name, value) #define (name) (value)
#endif
If I define DEBUGging, i want the variable (name) to be a variable, but
if not, I want it to be a constant. When I compile this, the preprocessor
starts complaining at the fourth line, because of the second #define. Is
this OT here? And if not, how should I solve this?
the d0ct0r