Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is "mutable" keyword?

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


Please Help Members By Posting Answers For Below Questions

What is the advantage of an external iterator.

1047


What would happen on forgetting [], while deallocating an array through new?

1091


What is the standard template library (stl)?

1785


Explain queue. How it can be implemented?

1159


What do you mean by global variables?

1074


What is a try block?

1074


Is c or c++ more useful?

1051


What is null pointer and void pointer and what is their use?

1102


How do you declare A pointer to function which receives an int pointer and returns a float pointer

1225


What is the fastest c++ compiler?

1109


How can you link a c program with a c function?

1076


What is the best c++ compiler for windows 10?

1041


Can we declare a base-class destructor as virtual?

1010


What is an adaptor class in c++?

1192


How can you quickly find the number of elements stored in a static array?

1098