(1) # 把宏参数变为一个字符串
(2) ## 把宏参数贴合在一起
#include<iostream>
using namespace std;
#define str(s) #s
#define cons(a,b) (int)(a##e##b)
void main() {
cout << str(vck) << endl;
cout << cons(2, 3) << endl;
system("pause");
}
第一个输出: vck
第二个输出: 2000