const char*, char const*, char*const,const char ** 等等 这些类型怎么区分?
The C++ Programming Language里面给出过一个助记的方法: 把一个声明从右向左读。
const char * p (其中 * 读作 pointer to)
------------p is a pointer to const char char const * p --------------p is a pointer to cosnt char char *const p --------------------p is a const pointer to char const char ** p ----------------- p is a pointer to pointer to const char
C++标准规定,const关键字放在类型或变量名之前等价的
例如
const int p == int const p ;