I would like to know is there any way to achieve this.
My requirement is to make the macro argument to be part of sub macro names for example:
I have
#if defined DEBUG_1
#define DEBUG_PRINT_1(fmt,args...) printf(fmt, ##args)
#if defined DEBUG_2
#define DEBUG_PRINT_2(fmt,args...) printf(fmt, ##args)
I want to combine these macro to be a configurable one as follows
#if defined DEBUG_x
#define DEBUG_PRINT_x(fmt,args...) printf(fmt, ##args)
How would I place this x in the second statement?
Let me know if this is possible or not and suggest other ways to achieve this printing verbosity with a single macro definition than multiple definitions