//s1 and s2 have same type, they're both strings that are const
const string s1;
string const s2;

//cstr1, cstr2 and cstr3 are the same type, they're all const pointers to string
string s;
typedef string *pstring;
const pstring cstr1 = &s;
pstring const cstr2 = &s;
string *const cstr3 = &s; 

//refVal1 and refVal2 are the same type, they're all const reference
const int ival = 1024;
const int &refVal1 = ival;
int const &refVal2 = ival;
posted on 2010-03-22 14:02  cppfans  阅读(187)  评论(0)    收藏  举报