C preprocessor Macro defining Macro

后端 未结 6 1198
耶瑟儿~
耶瑟儿~ 2020-12-29 01:49

Can you do something like this with a macro in C?

#define SUPERMACRO(X,Y) #define X Y

then

SUPERMACRO(A,B) expands to #define A B
<         


        
6条回答
  •  情话喂你
    2020-12-29 02:02

    Sorry, you cannot. You can call other macros in macros but not define new ones.

提交回复
热议问题