I need help because what I want, I dont know if it is possible to do it with macros.
I have:
Code:
#ifdef ESTADISTICAS
# define S(x) (x)
#else
# define S(x)
#endif
It is a macro to allow me to collect stats. Now I do something like:
But when I want something more complex like:
Code:
#ifdef ESTADISTICAS
if (cont < 3) ++stats.move_hit[cont];
#endif
It takes me three lines of code. Is there any way to do it in a only one line? like:
Code:
S(if (cont < 3) ++stats.move_hit[cont]);
Doing this way would allow me a more friendly code and more readable, in a single line, but when I compile I get an error "expected expression berore if".