What is the importance of mutable keyword?



What is the importance of mutable keyword?..

Answer / Alpna Bharti

The mutable keyword in C++ allows a member function to modify a base class member that has been declared as const. Without the mutable keyword, any attempt to modify such a member would result in a compile error.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

Differentiate between a constructor and a destructor in c++.

1 Answers  


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

1 Answers  


What do you mean by funtion prototype?

1 Answers  


What is the use of :: operator in c++?

1 Answers  


what do you mean by volatile variable?

1 Answers  


Write about all the implicit member functions of a class?

1 Answers  


What does the following do: for(;;) ; a) Illegal b) Loops forever c) Ignored by compiler...not illegal

1 Answers  


What is unary operator? List out the different operators involved in the unary operator.

1 Answers  


What is a linked list in c++?

1 Answers  


How to give an alternate name to a namespace?

1 Answers  


What does int * mean in c++?

1 Answers  


Which one is better- macro or function?

1 Answers   Fidelity,


Categories