#include <iostream>
using namespace std;
class Person{
public:
Person(){};
Person(int a,int b):m_A(a),m_B(b){}
Person operator+(Person& p){
Person tmp;
tmp.m_A=this->m_A+p.m_A;
tmp.m_B=this->m_B+p.m_B;
return tmp;
}
Person operator+(int a){
Person tmp;
tmp.m_A=this->m_A+a;
tmp.m_B=this->m_B+a;
return tmp;
}
int m_A;
int m_B;
};
void test01(){
Person p1(10,10);
Person p2(10,10);
Person p3=p1+p2;
Person p4=p1+10;
cout<<"p3的m_A:"<<p3.m_A<<" p3的m_B:"<<p3.m_B<<endl;
cout<<"p4的m_A:"<<p4.m_A<<" p3的m_B:"<<p4.m_B<<endl;
}
int main() {
test01();
return 0;
}