c++大学刚入手 求运行结果
#include <iostream.h>class A
{ private:
int a,b;
public:
A(int i,int j) {a=i;b=j;}
void move(int x,int y){a=a+x;b=b+y;}
void show(){cout<<"("<<a<<","<<b<<")"<<endl;}
};
class B:public A
{ private:
int x,y;
public:
B(int i,int j,int k,int l):A(i,j)
{ x=k;y=l; }
void show(){cout<<x<<","<<y<<endl;}
void fun() {move(3,5);}
void f1(){A::show();}
};
void main()
{ A e(1,2);
e.show();
B d(3,4,5,6);
d.fun();
d.A::show();
d.B::show();
d.f1();
}
求结果 谢谢各位大佬