例如:
int a = 12; cout << typeof(a) << endl;
预期产量:
int
c++ variables typeof c++11
是否有编译器以可读的方式返回类型的名称(或提供该功能或工具的库)。基本上我想要的是与您在源代码中编写的类型表达式相对应的字符串。
c++ typeid c++11
c++ ×2
c++11 ×2
typeid ×1
typeof ×1
variables ×1