//slist.cpp //methods for class SortedList #include #include "slist.h" void SortedList::insert(Type x) { Node *p, *q; p = firstnode(); q = NULL; while (p && p->getinfo()getnext(); } if (q) insertafter(x,q); else insertfront(x); } int SortedList::find(Type x) { Node *p; p=firstnode(); while (p && p->getinfo()<=x){ if (p->getinfo()==x) return 1; p = p->getnext(); } return 0; }