是什么##在code中的#define指令的意思是, [英] What does ## mean in the #define directive in the code here
本文介绍了是什么##在code中的#define指令的意思是,的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请告诉我解释了答案:
的#define F(G,H)G ## ^ h主要(){
的printf(%d个,F(100,10));
}
解决方案
##
用来连接无论是 ##之前
与任何更后。它用于级联
您可以检查细节参考
一个##中的任何两个连续的标识符之间运营
更换列表运行在两个标识符参数替代
(这是不宏扩展第一),然后并置的结果。
此操作被称为级联或标记粘贴
块引用>Please tell me the answer with explanation:
#define f(g,h) g##h main(){ printf("%d",f(100,10)); }
解决方案
##
is used to concatenate whatever is before the##
with whatever is after it. It is used for concatenation.You can check the reference for details
A ## operator between any two successive identifiers in the replacement-list runs parameter replacement on the two identifiers (which are not macro-expanded first) and then concatenates the result. This operation is called "concatenation" or "token pasting".
这篇关于是什么##在code中的#define指令的意思是,的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文