常量指针和指针常量的个人理解 常量指针const int* p 常量指针const int* p = &a 代表常量的指针,表示一个指针对应指向的值*p是常量不能改变,但是这个常量可以改变,只不过不能通过*p来改变,比如在c语言里,const char * p = char str[ ] ,p可以指向str,但不能通过p修改str里的值,只能通过str修改。 指针常量int* const p 指针常量int* const p = &a 代表指针是常量,指针的地址&a是常量不能改变