#define ITOA2(x) #x
#define ITOA(x) ITOA2(x) // 这里将数字宏展开为实际的数字
#define PORT 12345
#include <iostream>
int main()
{
std::cout << "port is:" ITOA(PORT) << std::endl;
std::cout << "port is:" ITOA2(PORT) << std::endl;
}
/tmp <root@debian> 02:42:52 $ ./a.out
port is:12345
port is:PORT