我正在检查某些类型的变量并得到一些令人困惑的结果:
#include <iostream>
#include <typeinfo>
using namespace std;
int main(void) {
int number = 5;
int* pointer = &number;
cout << typeid(number).name() << endl; // i
cout << typeid(pointer).name() << endl; // Pi
cout << typeid(&pointer).name() << endl; // PPi
return 0;
}
The i
means int
,但是怎么办Pi
and PPi
mean? Pointer int
?
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)