foo.cc:38:9: error: ISO C++ forbids declaration of ‘addNode’ with no type [-fpermissive]
38 | addNode(int x){
| ^~~~~~~
foo.cc:49:9: error: ISO C++ forbids declaration of ‘output’ with no type [-fpermissive]
49 | output(){
| ^~~~~~
foo.cc:58:9: error: ISO C++ forbids declaration of ‘destroy’ with no type [-fpermissive]
58 | destroy(){
| ^~~~~~~
foo.cc: In member function ‘int LinkList::addNode(int)’:
foo.cc:47:9: warning: no return statement in function returning non-void [-Wreturn-type]
47 | }
| ^
foo.cc: In member function ‘int LinkList::output()’:
foo.cc:56:9: warning: no return statement in function returning non-void [-Wreturn-type]
56 | }
| ^
foo.cc: In member function ‘int LinkList::destroy()’:
foo.cc:65:9: warning: no return statement in function returning non-void [-Wreturn-type]
65 | }
| ^