huihut / interview

📚 C/C++ 技术面试基础知识总结,包括语言、程序库、数据结构、算法、系统、网络、链接装载库等知识及面试经验、招聘、内推等信息。This repository is a summary of the basic knowledge of recruiting job seekers and beginners in the direction of C/C++ technology, including language, program library, data structure, algorithm, system, network, link loading library, interview experience, recruitment, recommendation, etc.

Home Page:https://interview.huihut.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

普通对象可以更新常成员变量??

ifls opened this issue · comments

c++ const 这一节
A b; // 普通对象,可以调用全部成员函数、更新常成员变量

当常成员变量是指针的时候可以更新,具体在 这个issue 讨论过。

这里确实错了,常成员变量不能被更新,已改

commented

如果函数以mutable修饰,就可以修改const成员变量了。