题目内容
根据给定的程序执行结果,将下列程序补充完整。#includeclass Base{public:Base(int i) {b=i;}_____________(1)____________________protected:int b;};class Derive1:public Base{public:Derive1():Base(1){};void Print(){cout<<"Derive"<Print();}int main(){Base *d1=new Derive1;___________(4)____________fun(d1);fun(d2);return 0;}程序的执行结果如下:Derive1's Print() called.Derive2's Print() called.
查看答案
搜索结果不匹配?点我反馈