1. coord 객체에 대한 + 연산이 가능하도록 연산자 오버로딩을 구현하라.

2. coord 객체에 대한 - 연산이 가능하도록 연산자 오버로딩을 구현하라.

3. coord 객체에 대한 != 연산이 가능하도록 연산자 오버로딩을 구현하라.

4. coord 객체에 대한 += 연 산이 가능하도록 연산자 오버로딩을 구현하라

#include <iostream>
using std::endl;
using std::cout;

class Point {
private:
 int x, y;
public:
 Point(int _x=0, int _y=0):x(_x), y(_y){}
 void ShowPosition();
 Point operator+(const Point& p);
};
void Point::ShowPosition(){
 cout<<x<<" "<<y<<endl;
}
Point Point::operator+(const Point& p){
 Point temp(x+p.x, y+p.y);
 return temp;
}

int main(void)
{
 Point p1(4, 2);
 Point p2(2, 1);
 Point p3=p1+p2;
 p3.ShowPosition();

 return 0;
}


여기까진 어떻게 해봤는데 나머진 어떻게 하는지 모르겠어서요..

잘하시는분 안계시나요 ㅜ..