/in/foo.cc: In function 'int main()':
/in/foo.cc:47:22: error: no matching function for call to 'PolyListNode::PolyListNode(int&)'
p=new PolyListNode(n);
^
/in/foo.cc:4:8: note: candidate: PolyListNode::PolyListNode()
struct PolyListNode
^~~~~~~~~~~~
/in/foo.cc:4:8: note: candidate expects 0 arguments, 1 provided
/in/foo.cc:4:8: note: candidate: constexpr PolyListNode::PolyListNode(const PolyListNode&)
/in/foo.cc:4:8: note: no known conversion for argument 1 from 'int' to 'const PolyListNode&'
/in/foo.cc:4:8: note: candidate: constexpr PolyListNode::PolyListNode(PolyListNode&&)
/in/foo.cc:4:8: note: no known conversion for argument 1 from 'int' to 'PolyListNode&&'
/in/foo.cc:49:9: error: no match for 'operator[]' (operand types are 'PolyListNode' and 'int')
cin>>p[i].coef>>p[i].index;
^
/in/foo.cc:49:20: error: no match for 'operator[]' (operand types are 'PolyListNode' and 'int')
cin>>p[i].coef>>p[i].index;
^
/in/foo.cc:50:14: error: no matching function for call to 'PolyList::PolyList(PolyListNode&)'
PolyList P(p);
^
/in/foo.cc:19:1: note: candidate: PolyList::PolyList(PolyList&)
PolyList::PolyList(PolyList &p)
^~~~~~~~
/in/foo.cc:19:1: note: no known conversion for argument 1 from 'PolyListNode' to 'PolyList&'