|
c++ # x 表示 将 x 变量 变成 字符串
c++ a##1 表示 连接的意思,
下面 上代码:
?
// testjin.cpp : 定义控制台应用程序的入口点。
//
#include stdafx.h
#define test(a) printf(hello#a)
#define testjj(a) printf(%d,a##_1)
int _tmain(int argc, _TCHAR* argv[])
{
test(c++sfsfs);
printf(
);
int x_1 = 1000;
testjj(x);
return 0;
}
输出:
?
helloc++
1000
?
|