/*****************************************************************
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;
}
/*==============================================================*/
LyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCk5hbWUgOiAKRGF0ZSA6IDIwMTcvMDIvMjIKQnkgICA6IENoYXJsb3R0ZUhvbkcKRmluYWw6IDIwMTcvMDIvMjIKKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiNpbmNsdWRlIDxpb3N0cmVhbT4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCnN0cnVjdCBQb2ludHsKICAgIFBvaW50KGludCBhPTEsIGludCBiPTEpOiB4KGEpLCB5KGIpIHt9CiAgICBQb2ludCAmIG9wZXJhdG9yKz0oUG9pbnQgY29uc3QgJnJocyl7CiAgICAgICAgeCArPSByaHMueDsKICAgICAgICB5ICs9IHJocy55OwogICAgICAgIHJldHVybiAqdGhpczsKICAgIH0KICAgIGludCB4LCB5Owp9OwpQb2ludCBjb25zdCAmIG9wZXJhdG9yKyhQb2ludCBjb25zdCAmbGhzLCBQb2ludCBjb25zdCAmcmhzKXsKICByZXR1cm4gUG9pbnQobGhzKSArPSByaHM7Cn0KLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCmludCBtYWluKGludCBhcmdjLCBjaGFyIGNvbnN0ICphcmd2W10pewogICAgUG9pbnQgcDE7CiAgICBQb2ludCBwOwogICAgcD1wK3AxOwogICAgY291dCA8PCBwLnggPDwgZW5kbDsKICAgIGNvdXQgPDwgcDEueCA8PCBlbmRsOwoKICAgIHJldHVybiAwOwp9Ci8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLw==