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

What is the importance of mutable keyword?

- The mutable keyword allows the data member of a class to change within a const member function.

- It allows to assign the values to a data member belonging to a class defined as “Const” or constant.

- It allows a const pointer to change members.

- It can be only applied to non-static and non-const data members of a class.

Syntax:
mutable data_member_variable_declaration;
Pointer vs. reference - C++
Pointer vs. reference - A reference must be initialized at the time of declaration whereas not needed...
Explain how to call C functions from C++
Explain how to call C functions from C++ - The extern keyword is used to call C functions from C++...
How to declare a class as a friend of another class - C++
How to declare a class as a friend of another class..
Post your comment