int * const 和 const int *

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;

posted on 2014-07-10 10:10  ini  阅读(314)  评论(0编辑  收藏  举报

导航