请将下列类定义补充完整。 class Base {public:void fun() {cout<<"Base:: fun"<<end1; } }; class Derived: public Base { public: v

admin2009-01-15  19

问题 请将下列类定义补充完整。
   class Base {public:void
   fun() {cout<<"Base:: fun"<<end1; } };
   class Derived: public Base {
   public:
   void fun() {
     【  】  //显式调用基类的fun函数
   cout<<"Derived:: fun"<<end1;
   }
   };

选项

答案Base:: fun();

解析 显式调用基类的fun 函数的规则。
转载请注明原文地址:https://jikaoti.com/ti/Upd0FFFM
0

最新回复(0)