#include
using namespace std;
class Complex //复数类
{
private://私有
double real;//实数
double imag;//虚数
public:
void print()
{
cout<cout< }
Complex(double real=0,double imag=0)
{
this->real=real;
this->imag=imag;
};
Complex operator+(Complex r);
};
Complex Complex::operator+(Complex r)
{
return Complex(this->real+r.real,this->imag+r.imag );
}
int main()
{
Complex com1(5,10),total,t(21,10);
total=com1+t;
total.print();
int a;
cin>>a;
return 0;
}