!!!!!今天遇到一个define 的用法,所以随手记录下来
1 #include <stdio.h>
2 #include <linux/kernel.h>
3
4 #define name_s name_size
5
6 struct tt{
7 int name_size;
8 int size;
9 }test;
10 int main()
11 {
12 test.name_size = 100;
13 test.size = 200;
14 printf("name_size = %d\n", test.name_size);
15 printf("size = %d\n", test.size);
16 printf("name_s = %d\n", test.name_s);//replace name_s with name_size;;;;;;
17 return 0;
18
19 }