示例21 sinclude <iostream. h> class shapes public: void draw o //基类中的函数 cout<"绘制基本形状\n"; class Circle public Shap private: int radius; public: void draw o //在派生类中重新定义 cout<<"绘制圆形\n"; 北大青鸟5 示例 2-1 #include <iostream.h> class Shapes { public: void draw() //基类中的函数 { cout << "绘制基本形状\n"; } }; class Circle : public Shapes { private: int radius; public: void draw() //在派生类中重新定义 { cout << "绘制圆形\n"; } };