在下面程序横线处填上适当的语句,使其输出结果为0,15,15。
#include
class base
{public:
__________f(){return 0;}
};
class derived:public base
{public:
int a,b,c;
__________set(int x,int y,int z){a=x;b=y;c=z;}
int f(){return a+b+c;}
};
void main()
{base b;
derived d;
cout<
d.set(3,5,7);
cout< base &p=d; cout< }
订单号:
遇到问题请联系在线客服
订单号:
遇到问题请联系在线客服