#define STR(x) printf(#x "=%d",x)
I misread the question..when you use it in printf..use
#define STR(x) "%s = %d ",#x,x
or
#define STR(x) #x "=%d",x
10
solved How to print variables with #define like #define STR(M) = value of M [closed]
#define STR(x) printf(#x "=%d",x)
I misread the question..when you use it in printf..use
#define STR(x) "%s = %d ",#x,x
or
#define STR(x) #x "=%d",x
10
solved How to print variables with #define like #define STR(M) = value of M [closed]