.

来源:互联网 发布:比特币交易平台 知乎 编辑:程序博客网 时间:2024/04/27 07:09
#include <iostream>


using namespace std;


class Point
{
public:
    Point()
    {
        cin>>x>>y;
    }
    void Move()
    {
        x+=xoff;
        y+=yoff;
    }
    void Get()
    {
        cin>>xoff>>yoff;
    }
    float GetX()
    {
        return x;
    }
    float GetY()
    {
        return y;
    }


private:
    float x,y,xoff,yoff;
};


class Rect: public Point
{
public:
    Rect()
    {
        Point();
        cin>>w>>h;
        Get();
    }
    float GetW()
    {
        return w;
    }
    float GetH()
    {
        return h;
    }
private:
    float w,h;
};


int main()
{
    Rect
    return 0;
}
原创粉丝点击