六狼论坛's Archiver
首页
›
C++
› C++中的const总结
harrison2010
发表于 2013-2-5 01:18:38
C++中的const总结
根据const在*的左侧还是右侧面来判断const到底针对的是谁
int * const temp; //常指针类型
int const * temp; //指向常量的指针
const int * temp; //不提倡
int const * const temp; //指向常量的指针常量
const int * const temp; //不提倡
一般const和&配合使用,有什么问题恢复!
页:
[1]
查看完整版本:
C++中的const总结