const member function不明白
来源:互联网 发布:增加字段的sql语句 编辑:程序博客网 时间:2024/05/18 12:03
class中,成员函数 const string& GetName()const{ return name}
第一个const与第二个const。。。不明白。我的理解:
第一个const,返回值为常量值。
第二个const,表明在该成员函数中不可以改变成员变量的值。(是不是就是认为成员变量为常量?象上面的函数返回值是不是就只能为const string,而不能为string?)
- const member function不明白
- Const Member Function(C++)
- const的object和 const member function
- const member function can return non-const type member vars
- 关于c++常量函数(const member function)
- 关于常量成员函数(const member function)
- what are the semantics of a const member function
- Relationship of the this pointer and (non-)const member function
- Item 10.const成员函数 (Meaning of a Const Member Function)
- const function, function const
- Function语义学之member function
- win32gui Member Function
- C++ virtual member function
- member function pointer
- [MFC] CString member function
- Member function callback
- C++ member function pointer
- 14.4.2.1 Applicable function member
- 最近在架构和编码中的方向
- 介绍 Nutch 第一部分:抓取 (翻译)
- 关于RFC(Request For Comments)
- 破解SQL Server连接错误-“SQL Server不存在或访问被拒绝”
- 基于关系数据库系统链式存储的树型结构数据,求某结点下的子树所有结点算法(t-sql语言实现)
- const member function不明白
- Windows信使之初探
- 两种IP文件的读取
- Whois协议查询IP的原理
- HTTP协议程序的编写与调试
- 使用C#在应用程序间发送消息
- 翻译:HTTP1.1 Chunked-Encoding
- 求字于街上无臂少年
- 获取URL在MSIE中的本地缓存