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 disadvantage of using a macro?
Is ca high or low level language?
Do vectors start at 0?
What is a v-table?
Name the debugging methods that are used to solve problems?
Does dev c++ support c++ 11?
write a corrected statement in c++ so that the statement will work properly. x = y = z + 3a;
What is array in c++ pdf?
Out of fgets() and gets() which function is safe to use and why?
What is auto used for in c++?
What is abstract class in c++?
Can I learn c++ without learning c?
How does code-bloating occur in c++?
what kind of projects are suitable for c and c++
write a corrected statement so that the instruction will work properly. if (4 < x < 11) y = 2 * x;