#ifndef LIST_H #define LIST_H #include #include "listNode.h" using namespace std; // Definition for Class List class List { private: // Each object contains two values ListNode *first; // Pointer to first ListNode object in List ListNode *last; // Pointer to last ListNode object in List void InsertAfterNode(ListNode *p, int x); void InsertFront(int x); void InsertSorted(int x); public: // Member functions List(); List(const List&); ~List(); void operator=(const List &); friend ostream & operator<<(ostream &, const List &); friend istream & operator>>(istream &, List &); void Erase(); }; #endif // LIST_H