#include<iostream>
#include<string>
using namespace std;
class Person {
public:
Person operator+(Person& p) {
Person p3;
p3.a = this->a + p.a;
p3.b = this->b + p.b;
return p3;
}
int a;
int b;
};
Person operator+(Person &p1,Person &p2) {
Person temp;
temp.a = p1.a + p2.a;
temp.b = p1.b + p2.b;
return temp;
}
void test() {
Person p1;
p1.a = 1;
p1.b = 2;
Person p2;
p2.a = 3;
p2.b = 4;
Person p3;
p3 = p1 + p2;
cout << p3.a << p3.b << endl;
}
int main() {
test();
system("pause");
return 0;
}