Курсовая работа: Работа со списками
};//end struct
//==========================================
//1. Abstract class Spisok
//==========================================
template <class Data> class spisok {
protected:
struct list {
Data inf;
AnsiString name;
list*next;
};//end struct list
list *top,*p;
public:
virtual void add(Data value, AnsiString name)=0;
virtual void remove(int index)=0;
virtual void change(int index, Data value)=0;
virtual int count()=0;
virtual Data getvalue(int index)=0;
virtual AnsiString getname(int index)=0;
virtual int search (AnsiString name)=0;
};//end class spisok
//==========================================
//2. CLASS STACK
//==========================================
template <class Data> class stack: public spisok <Data>{
public:
//***************CONSTRUCTORS************************
stack(){top=new list;top=NULL;}
~stack(){}