#define 宏与#,##


#include <stdio.h>
#include <stdlib.h>
//在#define中,标准只定义了#和##两种操作。
//#用来把参数转换成字符串,
//##则用来连接两个前后两个参数,把它们变成一个字符串。
#define parser(n) printf("token"#n"=%d\n",token##n)
int main()
{
    int token9=10;
    parser(9);
    return 0;
}
//output:
//token9=10
原文地址:https://www.cnblogs.com/wucg/p/1969570.html