#ifndef _list_h #define _list_h #include "type.h" #include "node.h" class List{ public: List(); List(Type x); int is_empty(); void insert_first(Type x); void insertafter(Type x, Node *p); void insert(Type x); void replace(Type x); Node* finditem(Type x); int isin(Type x); Node removefirst(); Node removeafter(Node *p); Node* get_firstnode(); friend ostream &operator<<(ostream&, const List &); protected: Node *firstnode; friend class ListIter; }; #endif //_list_h