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 is this weird colon-member (" : ") syntax in the constructor?

0 Answers  


Explain working of printf?

8 Answers  


What will happen if I allocate memory using "new" and free it using "free" or allocate sing "calloc" and free it using "delete"?

3 Answers  


How is modularity introduced in C++?

0 Answers   TCS,


What is the meaning of c++?

0 Answers  


What is the main use of c++?

0 Answers  


Why do we use templates?

0 Answers  


What is the outcome of cout< a) 16 b) 17 c) 16.5

0 Answers  


What is the full form of dos?

0 Answers  


What are the differences between malloc() and calloc()?

0 Answers  


What is low level language in simple words?

0 Answers  


Can manipulators fall in love?

0 Answers  


Categories