const 是个类型修饰符号。

来源:互联网 发布:淘宝上的牵引器有用吗 编辑:程序博客网 时间:2024/06/03 18:25

int const * p ;

 

const 修饰int

 

const int * p

 

const 还是修饰int

 

int * const p;

 

const 修饰  *

 

从后往前读:

 

 p是一个const*..指向int;

int * const   p [10];

 

p是一个const 的指针数组,这个指针指向 int;

 

 

 

 

阅读全文
0 0
原创粉丝点击