I defined with -D compiler option a symbol debug: -DDEBUG_VALUE. I would like a function in which the presence of a parameter depends on the definition or less of the symbol debug flag.
Namely if DEBUG_VALUE is defined, I have
my_function(int parameter1, int my_parameter_dependent)
Otherwise
my_function(int parameter1)
In this way
my_function(int parameter1 #ifdef DEBUG_VALUE , int my_parameter_dependent #endif)
I get
error: stray ‘#’ in program
error: expected ‘,’ or ‘...’ before ‘ifdef’
How can I solve it?
(I'm on a C++ compiler on a Unix system.)