[Univ of Cambridge] [Dept of Engineering]
next up previous contents
Next: Exercises Up: Classes Previous: Static Const members

Overriding behaviour

As well as adding members a derived class can override behaviour simply by redefining a member function. For instance, if you are developing objects for a graphics editor, you'd like each kind of object to have a draw function, but you'd like each kind of object to have its own version.

Later (section 11) more details of class derivation will be described.



Tim Love
2001-07-05