const int *p

const int *p1;

int const *p2;

int * const p3;

三者有什么区别么?

答案是在最后一种情况下指针是只读的,而在其他两种情况下指针指向的对象是只读的

posted on 2013-03-26 20:03  苯苯吹雪  阅读(167)  评论(0)    收藏  举报

导航