#include <iostream>
using namespace std;
class num {
private:
int a;
public:
num(int av=0):a(av) {}
num(const num& an):a(an.a) {}
num& operator = (num& rn) {
a=rn.a;
return *this;
}
num operator + (num& ra) {
num anum(a+ra.a);
return anum;
}
void show() {
cout<<a<<endl;
}
~num() {}
};
main()
{
num anum(14);
num bnum(34);
num cnum=anum+bnum; // 换成 num cnum; cnum=anum+bnum; 就不通过编译.
cnum.show();
system("PAUSE");
}
谁能帮我解决我这个疑问吗?