/*****************************************************************
Name : 
Date : 2017/02/22
By   : CharlotteHonG
Final: 2017/02/22
*****************************************************************/
#include <iostream>
using namespace std;

struct Point{
    Point(int a=1, int b=1): x(a), y(b) {}
    Point & operator+=(Point const &rhs){
        x += rhs.x;
        y += rhs.y;
        return *this;
    }
    int x, y;
};
Point const & operator+(Point const &lhs, Point const &rhs){
  return Point(lhs) += rhs;
}
/*==============================================================*/
int main(int argc, char const *argv[]){
    Point p1;
    Point p;
    p=p+p1;
    cout << p.x << endl;
    cout << p1.x << endl;

    return 0;
}
/*==============================================================*/