Linux学习--- 宏定义下#、##的使用
# 字符串化
## 连接符号
eg:
1 #include <stdio.h> 2 #define ABC(x) #x 3 #define DAY(c) myday##c 4 5 int main (){ 6 int myday1 = 10; 7 8 printf(ABC(123a\n)); //"123a\n" 9 printf("the day is %d\n",DAY(1)); 10 return 0; 11 } 12 //输出结果:123a 13 // the day is 10
- 上一篇 »PHP中Session在配置和自定义文件存储
- 下一篇 »linux下WPS的使用