char greeting[] = "Hello"; char* p = greeting; //non-const pointer, non-const data const char* p = greeting; //non-const pointer, const data char* const p = greeting; //const pointer, non-const data const char* const p = greeting; //const pointer, const data //const 虽然变化多端,但并不高深莫测。 //如果关键字const出现在星号的左边,表示被指物是常量; //如果关键字const出现在星号的右边,表示指针自身是常量; //如果出现在星号两边,表示被指物和指针两者都是常量。 //Effective C++