哪位哥哥详细解释下这代码啊!!初学者啊!
#include<iostream>using namespace std;
class A
{
public:
A(){}
A(int i){n=i;}
int get()const{return n;}
void set(int x){n=x;}
A operator+(const A&r) {return A(n+r.get());}
private:
int n;
};
int main()
{
A a(2),b(3),c;
c=a+b;
cout<<c.get();
return 0;
}