What is a mutable member?
Answer / nimish singh
One that can be modified by the class even when the object of the class or the member function doing the modification is const.
Understanding this requirement implies an understanding of C++ const, which many programmers do not have. I have seen large class designs that do not employ the const qualifier anywhere. Some of those designs are my own early C++ efforts. One author suggests that some programmers find const to be such a bother that it is easier to ignore const than to try to use it meaningfully. No wonder many programmers don't understand the power and implications of const. Someone who claims to have enough interest in the language and its evolution to keep pace with the ANSI deliberations should not be ignorant of const, however.
| Is This Answer Correct ? | 0 Yes | 0 No |
What's c++ used for?
What are the advantages of inheritance in c++?
What is a dangling pointer?
Do class method definitions?
Explain virtual destructor?
Difference between Top down and bottom up approaches for a given project ?
14 Answers BSNL, CSC, HCL, HP, IIT, Infosys, Siemens,
What is the best c++ ide?
What are arrays c++?
State the difference between delete and delete[].
Is swift better than c++?
Can you think of a situation where your program would crash without reaching the breakball, which you set at the beginning of main()?
What is the difference between public and private data members?