一道C++程序填空题,求大佬帮忙 5
#include<iostream>usingnamespacestd;classA{intx,y;public:A(intx,inty):x(x),y(y){}void...
#include <iostream> using namespace std; class A { int x, y; public: A(int x, int y) :x(x), y(y) {} void Move(int dx, int dy) { x += dx; y += dy; } void Show() { cout << x << "," << y; } }; class B :public A { public: B(int x, int y):1______ {} void Show() { cout<< "("; 2______ Show(); cout << ")"; } }; int main() { B b(1,2); b.Show(); 3________ b.Show(); }以上程序的运行结果如下,请填空完善程序(1,2)(4,6)
展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询