Member functions can be const
class Foo {
public:
Foo(int);
void store(int);
int fetch() const;
private:
int n;
};
Previous slide
Next slide
Back to first slide
View graphic version