#include <stdio.h>
#define Variable(x) #x
#define NAME(n) name##n
#define STRUCT(type) typedef struct _tag_##type type; \
struct _tag_##type
STRUCT(Student)
{
int ID;
char* name;
};
void test_1()
{
Student s1;
s1.ID = 100;
s1.name = "LiYi";
Student s2;
s2.ID = 101;
s2.name = "WangWu";
printf("ID:%d ,NAME:%s\n",s1.ID,s1.name);
printf("ID:%d ,NAME:%s\n",s2.ID,s2.name);
}
int main(char agrc,char* argv[])
{
int NAME(1);
int NAME(2);
NAME(1) = 1;
NAME(2) = 2;
printf("%s = %d\n",Variable(NAME(1)),NAME(1));
printf("%s = %d\n",Variable(NAME(2)),NAME(2));
test_1();
return 0;
}