foo.cc: In member function ‘void PolyLinkList::insert(int, int)’:
foo.cc:17:25: error: ‘newnode’ was not declared in this scope; did you mean ‘newNode’?
17 | newnode->next=head;
| ^~~~~~~
| newNode
foo.cc:25:20: error: ‘current’ was not declared in this scope
25 | if(current->next&¤t->next->b==b){
| ^~~~~~~
foo.cc: In function ‘int evaluate(int)’:
foo.cc:41:33: error: ‘head’ was not declared in this scope
41 | PolyLinkNode* current = head;
| ^~~~
foo.cc: At global scope:
foo.cc:52:5: error: declaration of ‘~ PolyLinkList’ as non-member
52 | ~PolyLinkList(){
| ^~~~~~~~~~~~~
foo.cc:59:1: error: expected declaration before ‘}’ token
59 | };
| ^
foo.cc: In function ‘int main()’:
foo.cc:71:13: error: ‘class PolyLinkList’ has no member named ‘evaluate’
71 | cout<<P.evaluate(x)<<endl;
| ^~~~~~~~