<<< Two forms of inheritance | Index | C++ way of conversions between types >>> |
class IShape is a pure interface - no implementation here at all:
//ishape.h: class IShape { public: virtual void draw() = 0; // Factory functions static IShape* MakeCircle(); static IShape* MakeSquare(); };//class IShape
<<< Two forms of inheritance | Index | C++ way of conversions between types >>> |