有以下程序
#include &...
发布于 2022-03-03 14:03:55
有以下程序
#include<iostream> using namespace std class Point { public: Point(float xx=0, float yy=0) {X=xxY=yy} float GetX() {return X} private: float X,Y } class Rectangle: private Point { public: Rectangle(float x, float y, float w, float h):Point(x,y) {W=wH=h} float GetX() {return ___________} float GetH() {return H} float GetW() {return W} private: float W,H} int main() { Rectangle r(1,2,3,4) cout<<r.GetX() return 0 }请为横线处选择合适的程序使得程序的运行结果是1( )?
登录后免费查看答案
关注者
0
被浏览
40
1 个回答