[英]What is the return type of this function?
我把这一行放到了一个类的宏定义中
virtual const char *GetEventName() const
{
return #classname;
}
这个函数及其返回类型发生了什么?
如果classname
是宏的参数之一,则#classname
是其值的字符串版本。 因此,如果classname
是SomeType
, #classname
将等同于"SomeType"
因为它返回一个字符串(c字符串),返回类型是const char *
有关更多信息,请查看字符串化
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.