#include using namespace std; class Figure { public: void draw () { cout << "Figure:draw () called" << endl; } }; class Circle : public Figure { public: void draw () { cout << "Circle:draw () called" << endl; } }; class ColorCircle : public Circle { public: void draw () { cout << "ColorCircle:draw () called" << endl; } }; int main () { Figure *fig = new ColorCircle (); fig->draw (); Circle fig2 = *(Circle*)fig; fig2.draw (); return 0; }