What is a mutable member?



What is a mutable member?..

Answer / nimish singh

One that can be modified by the class even when the object of the class or the member function doing the modification is const.

Understanding this requirement implies an understanding of C++ const, which many programmers do not have. I have seen large class designs that do not employ the const qualifier anywhere. Some of those designs are my own early C++ efforts. One author suggests that some programmers find const to be such a bother that it is easier to ignore const than to try to use it meaningfully. No wonder many programmers don't understand the power and implications of const. Someone who claims to have enough interest in the language and its evolution to keep pace with the ANSI deliberations should not be ignorant of const, however.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

What are the various operations performed on stack?

0 Answers  


What is a buffer c++?

0 Answers  


What happens if a pointer is deleted twice?

0 Answers   Flextronics,


What is a try block?

0 Answers  


What is the use of register keyword with the variables?

0 Answers  






What is the c++ code?

0 Answers  


what is polymorphism?

14 Answers   Accenture,


Design a program to input a date from user in the form day/month/year (e.g. 2/6/2000) and report whether it’s a valid date or not. The program should take account of leap years. You will need to know that a leap year is a year that is exactly divisible by 4, except that century years are only leap years if they are divisible by 400.

1 Answers  


How do I use arrays in c++?

0 Answers  


Incase of a function declaration, what is extern means?

0 Answers  


What is auto type c++?

0 Answers  


how can u create a doubly linked list with out using pointers?

2 Answers  


Categories