?????????????????Point??????????????????????x??y??????????????Point?????????Point?????x?????Point??x????y?????Point??y????

????????

#include<iostream>
#include<algorithm>
#include "Point.h"
using namespace std;


int main()
{

 Point pt1(3??4);
 Point pt2(4??5);
 Point pt3=pt1+pt2;

 cout<<pt3.getX()<<endl<<pt3.getY()<<endl;
 

 


 return 0;
}

??????????????????????????????????????????????????????????????????汻?????????????????????????????

????2???????????

???????????ж?????????????

 bool operator==(const Point&);
 bool operator!=(const Point&);

????????????????????????

bool Point::operator==(const Point &pt)
{
 return this->x==pt.x&&this->y==pt.y;
}

bool Point::operator!=(const Point &pt)
{
 return !(*this==pt);
}

?????????漲????==?????????????????!=?????????????==????????????????????????????????????==?????棬??!=??????

????3???????????????????????

????????????????????????????????????????????????????????????????????????????????????

???????????ж??庯????

 Point& operator++();
 Point& operator--();

???????????????????

Point& Point::operator ++()
{
 this->x++;
 this->y++;
 return *this;
}
Point& Point::operator --()
{
 x--;
 y--;
 return *this;

}