(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