Lecture 4 - Slide 26 : 40
Const member functions

It is possible to mark a member function as constant

A constant member function is not allowed to change the state of the object.

In addition, it makes sense to call a constant member function on a constant object

The programs on this slides motivate a solution on the following slide

A variant of Point with cached polar representation.
The implementation of class Point - with compilation problems.

The problem is that const member functions are not allowed to modify the caching variables.

In the next version - on the following page - we show how to deal with this problem