首页 > 其他 > 详细

int * const 和 const int *

时间:2014-07-12 09:05:21      阅读:330      评论:0      收藏:0      [点我收藏+]

It‘s not the same. The const modifier can be applied to the value, or the pointer to the value.

int * const

A constant pointer (not modifiable) to an integer (its value can be modified)

const int *

A modifiable pointer to a constant integer (its value can‘t be modified)

So you can imagine:

const int * const;

int * const 和 const int *,布布扣,bubuko.com

int * const 和 const int *

原文:http://www.cnblogs.com/ibing/p/3835146.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!