c++ - why cannot redefine a macro with previous value even using a temp variable? -


for example,i have macro string a="a", want append "b" a, become "ab", tried

#define "a" #define a "b" 

and found seems become self referential macros not possible. tried hold value of "b" using temp variable temp first, , undefine , define temp:

#include <sstream> #define "a" #define temp "b" #undef #define temp int main(){     printf(a);     return 0; } 

but still cannot compile, why?


Comments

Popular posts from this blog

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -