template class polynomial { private: class polynode { public: ct coef; int expo; polynode *next; polynode (ct co=0, int ex=0, polynode *ptr=NULL); { coef=co; expo=ex; next=ptr; } }; public: void display (); polynomial (); addterm (ct coef, int degree); private: polynode *head; int mydegree; }; template polynomial::polynomial () { mydegree = 0; head = new polynomial::polynode (0,0,NULL); } template polynomial::addterm (ct coef, int degree) { polynomial::polynode *temp; temp = new polynomial::polynode (); temp->coef = coef; temp->expo = degree; temp->next = NULL; head->next = temp; head->expo = degree; }