Answer Posted / shakti singh khinchi
Mutable keyword is used to modify a data member of an object
which has declared as constant. for example:
class XYZ
{
public:
int i;
mutable int cc;
public:
XYZ();
};
int main()
{
const XYZ obj;
obj.cc = 100; // modify obj object's member "cc" which has
been declared as mutable.
}
| Is This Answer Correct ? | 16 Yes | 7 No |
Post New Answer View All Answers
What is the advantage of an external iterator.
What would happen on forgetting [], while deallocating an array through new?
What is the standard template library (stl)?
Explain queue. How it can be implemented?
What do you mean by global variables?
What is a try block?
Is c or c++ more useful?
What is null pointer and void pointer and what is their use?
How do you declare A pointer to function which receives an int pointer and returns a float pointer
What is the fastest c++ compiler?
How can you link a c program with a c function?
What is the best c++ compiler for windows 10?
Can we declare a base-class destructor as virtual?
What is an adaptor class in c++?
How can you quickly find the number of elements stored in a static array?