发新话题
打印

宏定义只能简写输出不能简写输入吗?

#define PR printf
#define NL "%n"
#define Dn (D.......Dn) NL
#define S "%s"
既然输出能输入能吗
#define SC scanf
#define NL "%n"
#define Dn (&D......&Dn) NL
这样能吗?

TOP

宏定义就是字符替换
#define  a   b
代码中只要出现a的地方,你原原本本的把b换上就可以了

TOP

发新话题