top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is the importance of mutable keyword in C++?

+1 vote
421 views
What is the importance of mutable keyword in C++?
posted Dec 20, 2014 by Amit Kumar Pandey

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

"mutable" keyword is introduced in C++. When an object of a class is declared as constant or member function is constant or both are constants, in that case, member of an object can be modified only if it is declared as mutable otherwise it will throw an error.

answer Dec 21, 2014 by Neeraj Mishra
...