What is a mutable member?



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

Post New Answer

More C++ General Interview Questions

What are multiple inheritances (virtual inheritance)? What are its advantages and disadvantages?

0 Answers  


What is the full form of india?

0 Answers  


What is void pointer in c++ with example?

0 Answers  


What is ios in c++?

0 Answers  


Why null pointer is used?

0 Answers  






write the code that display the format just like 1 2 1 3 2 1 4 3 2 1 5 4 3 2 1 6 5 4 3 2 1

5 Answers  


Explain the difference between new() and malloc() in c++?

0 Answers  


Can a class be static in c++?

0 Answers  


What does ctime() do?

0 Answers  


Explain class invariant.

0 Answers  


Difference between overloaded functions and overridden functions

0 Answers  


I want explanation for this assignment: how to connect mysql database using c/c++,please explain this detailly?

0 Answers  


Categories