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
Is map sorted c++?
Why do we use vector in c++?
What is searching?
How do I download c++?
What is private, public and protected inheritance?
Write about the local class and mention its use?
Why is c++ still used?
What are the differences between java and c++?
Define upcasting.
What is ctime c++?
describe private access specifiers?
What do you know about near, far and huge pointer?
What is decltype c++?
Is C++ case sensitive a) False b) Depends on implementation c) True
What is a manipulator in c++?