const char*和char const*以及char*const const char*, char const*, char*const的区别问题几乎是C++面试中每次都会有的题目。 事实上这个概念谁都有,只是三种声明方式非常相似很容易记混。 Bjarne在他的The C++ Programming Language里面给出过一个助记的方法: 把一个声明从右向左读。char * const cp; ( * 读成 pointer to ) cp is a const pointer to char const char * p; p is a pointer to const char; Read More
posted @ 2011-02-16 16:03 BloodAndBone Views(873) Comments(0) Diggs(0) Edit