const 是个类型修饰符号。

xiaoxiao2021-02-28  97

int const * p ;

 

const 修饰int

 

const int * p

 

const 还是修饰int

 

int * const p;

 

const 修饰  *

 

从后往前读:

 

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

int * const   p [10];

 

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

 

 

 

 

转载请注明原文地址: https://www.6miu.com/read-74481.html

最新回复(0)