J
Jorge Naxus
Hello
I would like to write a macro like that:
#ifdef DEBUG
#define printj(...) printf(...)
#else
#printj(...)
#endif
So that printj behaves exactly like printf when DEBUG is true and
doesnt do anything when DEBUG is false.
But I dont know how to deal with the variable number of arguments of
printf(...).
Any help on how should be my "define"??
Thanks,
Jorge
I would like to write a macro like that:
#ifdef DEBUG
#define printj(...) printf(...)
#else
#printj(...)
#endif
So that printj behaves exactly like printf when DEBUG is true and
doesnt do anything when DEBUG is false.
But I dont know how to deal with the variable number of arguments of
printf(...).
Any help on how should be my "define"??
Thanks,
Jorge