[Univ of Cambridge] [Dept of Engineering]
next up previous contents
Next: Redefining operators Up: More on Classes Previous: Virtual members

Abstract Classes

Some classes represent abstract concepts for which objects cannot exist. The functions have to be defined in the derived classes. Such functions are called pure virtual functions and are denoted by the following notation

   virtual void print() =0;

in the base class. A class with one or more pure virtual functions is an Abstract Class.



Tim Love
2001-07-05