此函数的返回类型是什么
What is the return type of this function?
我把这一行放进了类的宏观定义中
virtual const char *GetEventName() const
{
return #classname;
}
此函数及其返回类型中发生了什么?
如果classname
是宏的参数之一,则#classname
是其值的字符串版本。所以如果classname
SomeType
,#classname
相当于"SomeType"
由于它返回一个字符串(c 字符串),因此返回类型为 const char*
有关更多信息,请查看字符串化
相关文章:
- 返回类型在 C++ OOP 中是什么意思
- 对于具有引用返回类型的搜索算法,默认返回值应该是什么?
- T*&返回类型到底是什么
- c++运算符重载-我实际返回的操作数类型是什么
- 运算符和返回类型是什么意思?
- STD :: SETW,STD :: SETFILL等的真实返回类型是什么?
- const 在具有尾随返回类型的自动退货声明中是什么意思
- 返回可能在C++中分配在堆栈上的成员时,最佳指针/引用类型是什么
- C++协方差返回类型的缺点是什么
- 尾随返回类型中的占位符类型的用途是什么
- C++中以下函数的返回类型是什么
- 此函数的返回类型是什么
- 提升的返回类型是什么::apply_visitor(延迟版本)
- C 中构造函数的返回类型是什么
- 实际上什么返回类型有一个新的
- 是覆盖返回类型所需的指针-继承
- 解析是如何工作的,或者是什么使类型完整或不完整
- 在 S 被解析为 for(auto &s :text)后,S 应该是什么类类型?
- 在知道变量是什么数据类型之前如何声明它
- 指针赋值应该使用什么返回类型?