Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试对宏的参数进行字符串化,以便它给出 unicode 字符串,即我想要得到以下内容:
WIDEN(4>5) L"4>5"
我的宏是这样的:
#define WIDEN(x) L #x
不幸的是不起作用。这个怎么做?
您想使用例如预处理器连接运算符##:
##
#define WIDEN(x) L ## #x