foo.cc: In member function ‘List& List::operator+(List&)’:
foo.cc:130:15: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wdangling-else]
130 | if(p->coe==0)
| ^
foo.cc: In function ‘int main()’:
foo.cc:174:27: error: cannot bind non-const lvalue reference of type ‘List&’ to an rvalue of type ‘List’
174 | cout<<La+Lb<<endl<<Laa*Lb;
| ~~~^~~
foo.cc:35:16: note: initializing argument 1 of ‘List::List(List&)’
35 | List(List &L)
| ~~~~~~^
foo.cc:111:51: note: initializing argument 2 of ‘std::ostream& operator<<(std::ostream&, List)’
111 | friend ostream & operator<<(ostream &out,List L)
| ~~~~~^