const in C++
来源:互联网 发布:淘宝登录界面刷不出来 编辑:程序博客网 时间:2024/06/07 10:10
Contents below mainly come fromhere
consts in this declaration:
// v───v───v───v───v───v───v───v───v───v───v───v─┬┐// ││// v──#1 v─#2 v──#3 v─#4 #5 int const * const Method3(int const * const&) const
#5 means that this function must be a member function of a class, and the object which calls this function can not be modified through this call.
#4 means that the pointer is const. That is to say, the pointer can not point to another address.
#3 means that the int is const that it can not have a different value.
#2 means that this function returns a const pointer, like #4.
#1 means that this function returns a const int, like #3.
阅读全文
0 0
- const in C&&C++
- Const Correctness in C++(转)
- const and pointer in c
- const in C and C++
- #define vs const in Objective-C 用 #define 还是 const
- some cases about "const" in C Program
- Key word:const in C language
- Const and volatile in C language
- 读书笔记-Thinking in C++-第8章 const
- How to initialize a static const map in c++?
- const c
- const【C++】
- const ||c
- C++Const
- [c++]const
- C++:const
- const in C++
- const in c++
- 基础练习 BASIC-9 特殊回文数
- Play框架的Netty Http服务器实现
- 【086】部署nodejs程序时,如何把自己用到的npm模块封装成Docker镜像,方便在离线的时候使用?
- 线性查找
- C
- const in C++
- const的用法
- 基础练习 BASIC-10 十进制转十六进制
- 第四周项目二_建设“单链表”算法库
- MT 191 Request for Payment of Charges, Interest and Other Expenses收费、利息和其他费用支付请求 参考Common Group Mess
- js中文字符的过滤问题
- Dubbo超时重试机制带来的数据重复问题
- 约瑟夫环
- 51nod-1079 中国剩余定理