what is the use of mutable key word

Answer Posted / ramakant

This keyword can only be applied to non-static and non-
const data members of a class. If a data member is declared
mutable, then it is legal to assign a value to this data
member from a const member function.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

program for insertion ,deletion,sorting in double link list

2285


Write a c++ program to display pass and fail for three student using static member function

2820


Why do we need polymorphism in c#?

695


What is polymorphism oop?

631


What is encapsulation in simple terms?

545






What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }

1995


What are objects in oop?

614


What is object in oop with example?

713


Question: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date.

645


• What are the desirable attributes for memory managment?

1734


What is overriding in oop?

554


What is overloading in oops?

606


What is polymorphism what is it for and how is it used?

577


Write a program to reverse a string using recursive function?

1798


Plese get me a perfect C++ program for railway/airway reservation with all details.

3433