class Imaginary{
public:
Imaginary(double c,double d)
:real(c),imag(d)
{};
Imaginary add(Imaginary,Imaginary);
//其他参照add写
private:
double real;
double imag;
}
Imaginary::add(Imaginary a,Imaginary b){
return Imaginary(a.real+b.real,a.imag+b.imag);
}