foo.cc: In member function 'Complex Complex::operator*(Complex&)':
foo.cc:21:7: warning: unused variable 'rr' [-Wunused-variable]
21 | int rr = c.re, ii = c.im;
| ^~
foo.cc:21:18: warning: unused variable 'ii' [-Wunused-variable]
21 | int rr = c.re, ii = c.im;
| ^~
foo.cc: In function 'void test01()':
foo.cc:56:11: error: cannot bind non-const lvalue reference of type 'Complex&' to an rvalue of type 'Complex'
56 | C = c1+c2+c3;
| ~~~~~^~~
foo.cc:27:28: note: initializing argument 1 of 'void Complex::operator=(Complex&)'
27 | void operator = (Complex &c)
| ~~~~~~~~~^
foo.cc:59:12: error: cannot bind non-const lvalue reference of type 'Complex&' to an rvalue of type 'Complex'
59 | C1 = c1*c2*c3;
| ~~~~~^~~
foo.cc:27:28: note: initializing argument 1 of 'void Complex::operator=(Complex&)'
27 | void operator = (Complex &c)
| ~~~~~~~~~^
[Hydro](https://hydro.ac)提供评测服务