助记方法:把一个声明从右向左读
比如:
1. char * const cp; //cp is a const pointer to char
2. const char * cp; //cp is a pointer to const char;
规则:
¨ 声明从右到左读:
¨ * 读成 pointer to
¨ ** 读成 (a) pointer to (a) pointer to
¨ * const 读成 const pointer to
再比如:
1. char ** cpp; // cpp is a pointer toa pointer to char
2. const char ** cpp; // cpp is a pointer toa pointer to const char
3. char * const * cpp; // cpp is a pointer toconst pointer to char
4. const char * const * cpp; // cpp is pointer toconst pointer to const char
5. char ** const cpp; // cpp isconst pointer to pointer to char
6. char * const * const cpp; // cpp is const pointer to const pointer to char
7. const char * const * const cpp; // cpp is const pointer to const pointer to const char