您的位置:首页 > 其它

2668-Point类的定义

2017-09-23 00:29 295 查看
#include <bits/stdc++.h>
#define Max 1010000

using namespace std;

class Point{
int x,y;
public:
void SetPoint(int x, int y)
{
this->x = x;
this->y = y;
}
void ShowPoint()
{
cout << "(" << x << "," << y << ")" << endl;
}
};

int main()
{
Point point;
point.SetPoint(10,11);
point.ShowPoint();
return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: