C++ 分析下列程序的运行结果 #include <iostream> using namespace std; class A { 10
#include<iostream>usingnamespacestd;classA{public:A(inti,intj){a=i;b=j}voidMove(intx,...
#include <iostream>using namespace std;class A{public:A(int i ,int j){a=i;b=j}void Move(int x,int y){a+=x;b+=y;}void Show(){cout<<"(<<a<<","<<b<<")"<<endl:}public:int a.b:};class B:private A{public:B(int i,int j,int k,int l):A(i,j){x=k;y=l}void Show(){cout<<x<<","<<y<<endl;}voidfun(){Move(3.5);}void fl(){A::Show();}private:int x,y;};void main(){Ae(1,2);e.Show();B d(3,4,5,6)d.fun();d.Show();d.fl();}我手打可能有错误不对的话请看一下图片跪求各位大神了!!!!!主要是求解析啊!!!谢谢大大!主要是解析!
展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询