Replacing text macros: #define, ##

来源:互联网 发布:中国经贸数据网 编辑:程序博客网 时间:2024/06/05 09:05
 

原文地址: http://en.cppreference.com/w/cpp/preprocessor/replace

# and ## operators:用于代码中的变量替换

An # operator before an identifier in the replacement-list of function-like macro puts in quotes the text, resulting from the identifier after the parameter replacement step.

An ## operator between any two successive identifiers in the replacement-list concatenates two pieces of text, resulting from the identifiers after the parameter replacement step.

原创粉丝点击