// linklist2.h By: Aiman Hanna - ©1993-2003 Aiman Hanna #ifndef __LINKLIST2_H #define __LINKLIST2_H #include class IntList; // Forward declaration. class Node { friend class IntList; friend ostream& operator<< ( ostream&, IntList ); public: Node(); private: int value; Node *next; }; class IntList { friend ostream& operator<< ( ostream&, IntList ); public: IntList(); IntList( const IntList& ); IntList& operator= ( const IntList& ); void Insert( int ); void InsertByBadImplementation( int ); void Remove(); void Head(); void Tail(); IntList& operator-- (int); // postfix instance of ++ operator IntList& operator++ (int); // as 'int' is stated as an argument IntList& operator-- (); // prefix instance of -- operator IntList& operator++(); // prefix instance of ++ operator int Retrieve() const; void Update( int ) ; int Length(); ~IntList(); private: Node *first, *last, *current; int size; }; #endif