一、代码 #include<iostream> #include<typeinfo> using namespace std; int main(){ bool a; char b; short c; int d; long e; float f; double g; long long h; cout<<typeid(a).name()<<endl; cout<<typeid(b).name()<<endl; cout<<typeid(c).name()<<endl; cout<<typeid(d).name()<<endl; cout<<typeid(e).name()<<endl; cout<<typeid(f).name()<<endl; cout<<typeid(g).name()<<endl; cout<<typeid(h).name()<<endl; return 0; } 二、返回值对照 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