LinkedList - LinkedListIterator end() { return...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
#include <iostream> #include "LinkedListIterator.h" using namespace std ; class ListNode ; class LinkedList { public: LinkedList() ; ~LinkedList() ; LinkedList (const LinkedList &) ; LinkedList& operator=(const LinkedList &) ; void addToFront(int v) ; void addToBack(int v) ; int removeFromFront() ; int removeFromBack() ; bool isEmpty(); void append(const LinkedList &l); friend ostream & operator << (ostream &, const LinkedList &) ; LinkedListIterator begin() { return LinkedListIterator(fst); }
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: LinkedListIterator end() { return LinkedListIterator(NULL); } private: ListNode *fst; ListNode *lst ; void deleteContents () ; } ; class ListNode { public: ListNode(int, ListNode *) ; ~ListNode() ; friend class LinkedList ; friend class LinkedListIterator; friend ostream &amp; operator &lt;&lt; (ostream &amp;, const LinkedList &amp;) ; private: int value ; ListNode *next ; } ; ostream &amp; operator&lt;&lt;(ostream &amp;, const LinkedList &amp;) ;...
View Full Document

Ask a homework question - tutors are online