【文件属性】:
文件名称:重载函数的运行
文件大小:2KB
文件格式:TXT
更新时间:2022-02-15 04:48:23
Point类
. 定义Point类,有坐标x,y两个成员变量;对Point类重载“++”、“--”运算符,实现坐标值的改变。
#include
using namespace std;
class point
{
public:
point(){};
point(int a,int b)
{
x=a;
y=b;
}
point operator++();
point operator++(int);
point operator--();
point operator--(int);
void showpoint() const;
private: