编程技巧:
##连接符号,用在带参数的宏定义中将两个子串在编译时候联接起来,组成一个新的字串。但是不可以把##符放在字串最前面或最后面
#则表示
测试用例:
#include <stdio.h>
#define PREFIX0(module) 10##module
#define PREFIX1(module) "hello"#module
void main(void)
{
printf ("test_int=%d\n",PREFIX0(9));
printf ("test_string=%s\n",PREFIX1(world));
}
测试结果:
test_int=109
test_string=helloworld