C++ 程序:使用 typeid 函数查看变量数据类型
#include
int main(){ string name = '测试'; int age = 20; float height = 1.75;
cout << typeid(name).name() << endl;
cout << typeid(age).name() << endl;
cout << typeid(height).name() << endl;
return 0;
}
原文地址: https://www.cveoy.top/t/topic/eIOv 著作权归作者所有。请勿转载和采集!