foo.cc:7:9: error: expected ‘;’ at end of member declaration
7 | }
| ^
| ;
foo.cc:6:17: error: expected primary-expression before ‘return’
6 | return ch+ma+en;
| ^~~~~~
foo.cc:6:17: error: expected ‘}’ before ‘return’
foo.cc:5:16: note: to match this ‘{’
5 | int tot{
| ^
foo.cc:6:17: error: cannot convert ‘<brace-enclosed initializer list>’ to ‘int’ in initialization
6 | return ch+ma+en;
| ^~~~~~
foo.cc:6:17: error: expected ‘;’ before ‘return’
foo.cc: In member function ‘bool Node::operator<(Node)’:
foo.cc:9:27: error: expression cannot be used as a function
9 | return tot()>y.tot()||tot()==y.tot()&&ch>y.ch||tot()==y.tot()&&ch==y.ch&&id<y.id;
| ~~~^~
foo.cc:9:35: error: expression cannot be used as a function
9 | return tot()>y.tot()||tot()==y.tot()&&ch>y.ch||tot()==y.tot()&&ch==y.ch&&id<y.id;
| ~~~~~^~
foo.cc:9:42: error: expression cannot be used as a function
9 | return tot()>y.tot()||tot()==y.tot()&&ch>y.ch||tot()==y.tot()&&ch==y.ch&&id<y.id;
| ~~~^~
foo.cc:9:51: error: expression cannot be used as a function
9 | return tot()>y.tot()||tot()==y.tot()&&ch>y.ch||tot()==y.tot()&&ch==y.ch&&id<y.id;
| ~~~~~^~
foo.cc:9:67: error: expression cannot be used as a function
9 | return tot()>y.tot()||tot()==y.tot()&&ch>y.ch||tot()==y.tot()&&ch==y.ch&&id<y.id;
| ~~~^~
foo.cc:9:76: error: expression cannot be used as a function
9 | return tot()>y.tot()||tot()==y.tot()&&ch>y.ch||tot()==y.tot()&&ch==y.ch&&id<y.id;
| ~~~~~^~
foo.cc: In function ‘int main()’:
foo.cc:20:58: error: expression cannot be used as a function
20 | for(int i=1;i<=5;i++)cout<<a[i].id<<' '<<a[i].tot()<<endl;
| ~~~~~~~~^~