5/26/08

Explain the difference between the following... public, private, protected and mutable type.

- public - These members can be accessed any where, inside class outside class in derived class.

- protected – can be used within the class and inside derived classes.

- private - can be used only inside the class,

- mutable – if a const method is declared which ensure that the state of object or member variable will not be modified inside such const method . one can declare the variable as mutable and it modified by const method. Basically used for const ojbects.

No comments:

ITUCU