#include <typeinfo>
cout << typeid( iobj ).name() << endl; // 打印: int
cout << typeid( 8.16 ).name() << endl; // 打印: double
C/C++ 查看数据类型
最新推荐文章于 2024-05-30 17:38:09 发布
#include <typeinfo>
cout << typeid( iobj ).name() << endl; // 打印: int
cout << typeid( 8.16 ).name() << endl; // 打印: double