【简答题】在下面的程序的横线处填上适当的语句,使该程序的输出为12。 include 〈iostream〉 using namespace std; class Base { public: int a; Base(int i) { a=i;} }; class Derived : public Base { int a; public: Derived(int x) : Base(x),b(x+1) {}...
【简答题】在下面程序的横线处填上适当的语句,使该程序的输出为12。 include <iostream> using namespace std; class Base { public: int a; Base(int i){a=i;} }; class Derived: public Base { int a; public: Derived(int x): Base(x),b(x+l){} void ...