C++查看变量类型
转自:https://blog.csdn.net/Koyurion/article/details/86315532
1.用法
#include<typeinfo> //需要包含头文件 typeid(data).name() //打印值: bool: b char: c signed char: a unsigned char: h (signed) short (int): s unsigned short (int): t (signed) (int): i unsigned (int): j (signed) long (int): l unsigned long (int): m (signed) long long (int): x unsigned long long (int): y float: f double: d long double: e