Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

QUESTION: WHAT THE HECK IS "mutable"? (a reserved word in c++)

Status
Not open for further replies.

dcgsmix

Programmer
Dec 20, 2001
35
0
0
IL
Hello guys

somebody told me about a reserved word in c++, that i never heard about (he too...)
that word is not implemented in anywhere on the internet
that word is: mutable

can anybody told me what that word means?


Thanks
Daniel Cohen Gindi
 
I paste this text from Inprise Docs. Hope it serves for help.

mutable

Category
C++-Specific Keywords, Storage class specifiers

Syntax
mutable <variable name>;

Description
Use the mutable specifier to make a variable modifiable even though it is in a const-qualified expression.

Using the mutable Keyword
Only class data members can be declared mutable. The mutable keyword cannot be used on static or const names. The purpose of mutable is to specify which data members can be modified by const member functions. Normally, a const member function cannot modify data members.

 
Thanks Daniel Cohen Gindi
dcgsmix@gmx.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top