分类: C/C++
2013-02-01 10:47:07
## 是连接符号,连接两个字符串
#是把名字代替成参数中的字符串
#define PRINTF(value) printf( #value " = %d/n", value );
#define FUNC(arg)
void print##arg(void)
{
printf(#arg " = %d", arg);
}
FUNC(size);
展开后生成代码:
void printsize(void)
{
printf("size" " = %d", size );
}
转自:http://blog.csdn.net/binglingshuang/article/details/3401005