<<c++ primer>> 指向const对象指针&const指针
来源:互联网 发布:淘宝手机端显示宝贝 编辑:程序博客网 时间:2024/06/05 10:44
参见<<c++ primer>> 110页 <<数组和指针>> 一节
=-=-=-=-=-=-=-=-=-=-=-=-=-指向const对象指针关键理解=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=const double *cptr;//指向const对象指针关键理解:可以指向非const对象, 但不能通过该指针修改所指向对象的值,=-=-=-=-=-=-=-=-=-=-=-=-const指针关键理解=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=int *const curErr = &errNumb;//const指针关键理解:"curErr是指向int型对象的const指针",const指针的值不能修改,意味着不能使curErr指向//其他对象。但如果指针所指对象的值是非常量,则可使用curErr修改该对象的值=-=-=-=-=-=-=-=-=-=-=-=-指向const对象的const指针关键理解=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=const double pi = 3.14159;const double *const pi_ptr = π//指向const对象的const指针关键理解:从右向左阅读该语句:"pi_ptr首先是一个const指针,指向double类型//的const对象",既不能修改pi_ptr所指对象的值,也不允许修改该指针的指向(即pi_ptr中存放的地址值)
- <<c++ primer>> 指向const对象指针&const指针
- 指向const对象的指针&&&const指针
- 指向const对象指针 & const指针
- 指向const对象的指针 const指针
- C++中的指向const对象的指针、const指针、指向const对象的const指针
- const指针,指向const的指针,指向const的const指针 -- C
- 如何区分“指向const对象的指针”和“const指针”?
- 如何区分“指向const对象的指针”和“const指针”?
- 指向const对象的指针和const指针
- 如何区分“指向const对象的指针”和“const指针”?
- 如何区分“指向const对象的指针”和“const指针”?
- 指向const对象的指针和const指针
- “指向const对象的指针” 和 “const指针”
- 指向const对象的指针和const指针 (转)
- const指针和指向const对象的指针
- “指向const对象的指针”和“const指针”
- 指向const对象的指针和const指针
- const指针和指向const对象的指针
- hdu 3465 Life is a Line
- 引用使用需要注意的总结
- 目标文件结构介绍
- vi命令参考
- linux中用socket双向传输声音
- <<c++ primer>> 指向const对象指针&const指针
- SDP会话描述协议中的参数整理
- 栈的链式存储结构与操作
- TestDept. 环境规划(笔记)
- javascript笔记-jsunit简单例子
- drupal 数据库查询
- Base64与图片互转
- 去上海
- 用 jstl 取 Date(java.util.Date) 的年的值 和月的值