C++ const member functions
Thursday, June 24, 2010
- A const member function is a function which will not modify any member of the class it belongs to (specifically members which are not declared static).
- A const member function can change members of its container class that are defined as mutable.
- A const member function, if it calls a non-const member function, which modifies class members, compiler will throw an error.
0 comments:
Post a Comment