第1个回答 推荐于2017-09-01
#define call(x,y) x##y
##把x和y连接起来,相当于新变量xy
xy+call(x,y) 就相当于xy+xy=20+20=40;
参考资料:
The preprocessor operator ## provides a way to concatenate actual arguments during macro
expansion. If a parameter in the replacement text is adjacent to a ##, the parameter is replaced
by the actual argument, the ## and surrounding white space are removed, and the result is rescanned.
For example, the macro paste concatenates its two arguments:
#define paste(front, back) front ## back
so paste(name, 1) creates the token name1.本回答被提问者采纳
第2个回答 2010-09-20
## 连接符号由两个井号组成,其功能是在带参数的宏定义中将两个子串(token)联接起来,从而形成一个新的子串。
call(x,y) 的意思就是 xy
即 xy+call(x,y) = xy+xy = 20 + 20 = 40