foo.cc: In constructor ‘PolyLinkNode::PolyLinkNode(int, int)’:
foo.cc:8:13: warning: ‘PolyLinkNode::r’ will be initialized after [-Wreorder]
8 | int r;
| ^
foo.cc:6:23: warning: ‘PolyLinkNode* PolyLinkNode::next’ [-Wreorder]
6 | PolyLinkNode* next;
| ^~~~
foo.cc:10:9: warning: when initialized here [-Wreorder]
10 | PolyLinkNode(int x=0,int r=0):x(x),r(r),next(NULL)
| ^~~~~~~~~~~~
foo.cc: In member function ‘void PolyLinkList::calculate()’:
foo.cc:43:37: error: ‘pow’ was not declared in this scope
43 | s += p->x * pow(x, p->r);
| ^~~