Code:header file struct node { int x; node *next; node(y, node *next) : x(y), next(next) {} };errorCode:cpp file List::node::node(int y, node *next) : x(y), next(next){ node *cur=head; if(cur){ while(cur->next!=NULL) cur=cur->next; cur->next=next; } else head=next; }
redefinition