const修饰

const修饰是否能修改,判断性质简便方法:从由往左读,遇到p就替换为“p is a”,遇到*就替换为“point to”,其余不变。

如 const int p; p is a int const. p是一个int型常量

 

posted on 2022-05-19 22:00  蜀山菜鸟  阅读(25)  评论(0)    收藏  举报