Z
Zeng Dinghao
char c = 'd';
const char cc = 'd';
char* pc = "dfdfdf";
const char* pcc = "dfdfdf";
char const* cpc = "dfdf";
cout << typeid(c).name() << endl;
cout << typeid(cc).name() << endl;
cout << typeid(pc).name() << endl;
cout << typeid(pcc).name() << endl;
cout << typeid(cpc).name() << endl;
in vc6, I got
char
char
char *
char const *
char const *
and in gcc, I got
c
c
Pc
PKc
PKc
const char cc = 'd';
char* pc = "dfdfdf";
const char* pcc = "dfdfdf";
char const* cpc = "dfdf";
cout << typeid(c).name() << endl;
cout << typeid(cc).name() << endl;
cout << typeid(pc).name() << endl;
cout << typeid(pcc).name() << endl;
cout << typeid(cpc).name() << endl;
in vc6, I got
char
char
char *
char const *
char const *
and in gcc, I got
c
c
Pc
PKc
PKc