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
Post a Comment