Tuesday, June 20, 2006

what is volatile? what is mutable?

volatile is a c++ keyword which indicates to the compiler that the value changes often (ie; by the user) and that the cached value should not be used. The compiler then retrieves the value from the physical memory.

mutable is a c++ keyword which can be used on class member variables to indicate that their value could change, even if a const object of the class is declared.

0 Comments:

Post a Comment

<< Home