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 the word you will use when defining a function in base class to allow this function to be a polimorphic function?

0 Answers  


Explain selection sorting?

0 Answers  


Write about all the implicit member functions of a class?

0 Answers  


Write is a binary search tree? Write an algo and tell complexity?

0 Answers   Axtria,


How many storage classes are available in C++?

1 Answers  






What are manipulators used for?

0 Answers  


What is #include c++?

0 Answers  


What is helper in c++?

0 Answers  


what is the size of this class class size { public: char data1; double d; int data2; char data3; double data4; short data5; }; please explain the padding for these double variables.

9 Answers  


What is a protocol class?

1 Answers  


How do I download c++?

0 Answers  


What does new do in c++?

0 Answers  


Categories