// ConstIterator.h #ifndef CONSTITERATOR_CLASS #define CONSTITERATOR_CLASS #include "Bst.h" #include "Tnode.h" #include class ConstIterator { Bst *root; // points to BST to which we are referring Tnode *curr; // points to current Tnode public: // initialize curr to currIn ConstIterator( Bst *bstIn = NULL, Tnode *currIn = NULL ); // "dereference" curr, returns string Tnode *operator->(); // pre-increment operator ConstIterator &operator++(); // post-increment operator ConstIterator operator++( int ); // pre-decrement operator ConstIterator &operator--(); // post-decrement operator ConstIterator operator--( int ); // equality operator bool operator==( const ConstIterator &other ); // inequality operator bool operator!=( const ConstIterator &other ); // like begin() void setToFirstWord(); // link end() void setToLastWord(); private: // YOU MAY PLACE ANY FUNCTIONS HERE THAT YOU WISH // helper functions }; #endif //CONSTITERATOR_CLASS