List < int > the_list
main()
const int maxlist=1000; enum Error_code { success, overflow, underflow, range_error }; template <class List_entry> class List { public: List(); bool empty(); bool full(); int size(); Error_code insert(int position, const List_entry &x); Error_code retrieve(int position, List_entry &x)const; Error_code replace(int position, const List_entry &x); Error_code remove(int position, List_entry &x); void traverse(void (*visit)(List_entry &x));//*visit is the pointer to function which performs operation on list protected: int count; List_entry entry[maxlist]; };
#include"List.h" template <class List_entry> List<List_entry>::List() { count=0; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)