int a=0; const int *const p=&a; // *p=2;//error: assignment of read-only location '*(const int*)p' int *const p1=&a; *p1 =3;//正确
在p的生命中,从左往右的第一个const说明,它不能改变a中的值,第二个const说明它不能指向别的对象。