【发布时间】:2013-05-07 02:04:04
【问题描述】:
#define DECLARE_DELETE_PTR(type) \
void DeletePtr_##type(string &operand) \
{\
}\
C++宏定义中##是什么意思?
跟后面的代码有什么区别?
#define MAKE_STRINGS(VAR) #VAR
只有一个#,但前者是两个#
【问题讨论】:
-
请参阅(以及其他)Macro directives in C 以讨论字符串化(使用单个
#,如 cmets 对各种答案中所述),以及 C preprocessor and concatenation 以获取此问题的副本。
标签: c++ c-preprocessor