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 a sequence in c++?

1072


What is functions syntax in c++?

1201


Explain friend class?

1186


What do you mean by public protected and private in c++?

1112


What are the various access specifiers in c++?

1084


Write a single instruction that will store an EVEN random integer between 54 and 212 inclusive in the variable myran. (NOTE only generate EVEN random numbers)

2003


What is a local reference?

1235


Can we define a constructor as virtual in c++?

1186


What does 7/9*9 equal ? a) 1 b) 0.08642 c) 0

999


What is the purpose of the "delete" operator?

1114


What is the purpose of ios::basefield in the following statement?

1303


Should the member functions which are made public in the base class be hidden?

1076


How do you master coding?

1089


On throwing an exception by the animal constructor in p = new animalq, can memory leak occur?

1183


If there are two catch statements, one for base and one for derived, which should come first?

1078