```1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 ``` ```#include using namespace std; class complex{ double real; double image; public: complex(double r=0,double i=0):real(r),image(i){}; complex(const complex& c): real(c.real),image(c.image){}; ~complex(){}; double re() const{ return real; } double im() const{ return image; }; const complex&operator=(const complex&c) { real=c.real; image=c.image; return *this; }; const complex&operator+=(const complex&c) { real+=c.real; image+=c.image; return *this; }; const complex&operator-=(const complex&c) { real-=c.real; image-=c.image; return *this; }; const complex&operator*=(const complex&c) { double keepreal=real; real=real*c.real-image*c.image; image=keepreal*c.image+image*c.real; return *this; }; const complex&operator/=(double d) { real/=d; image/=d; return *this; }; friend complex operator!(const complex &c) { return complex(c.re(),-c.im()); }; friend double abs2(const complex&c) { return (c.re()*c.re()+c.im()*c.im()); }; const complex&operator/=(const complex&c) { return *this *=(!c)/=abs2(c); }; const complex operator+(const complex& c, const complex& d) { return complex(c.re()+d.re(),c.im()+d.im()); }; const complex operator-(const complex& c, const complex& d) { return complex(c.re()-d.re(),c.im()-d.im()); }; const complex operator-(const complex&c) { return complex(-c.re(),-c.im()); }; const complex operator/(const complex&c,const complex&d) { return complex(c)/=d; }; }; int main(){ complex c=1.,d(3.,4.); return 0; } ```
 ```1 2 ``` ```Line 62: error: 'const complex complex::operator+(const complex&, const complex&)' must take either zero or one argument compilation terminated due to -Wfatal-errors. ```