class Iterator { public: enum specialValues { EOS = 0 }; Iterator():strPtr(NULL),lastChar(EOS),lastIndex(0) {} ~Iterator() { if (strPtr != NULL) delete strPtr; } char look(); char get(); void setup (String2002 str); // returns the most recently examined character // (EOS if nothing has been examined, or there is no string) char lastLook () { return lastChar; } // returns position of the most recently examined character // (zero if nothing has been examined, or there is no string) int lastLookIndex () { return lastIndex; } // returns the string stored in the iterator ("" if there is none) String2002 getString2002 (); private: String2002 *strPtr; int index; // information upon last character examined char lastChar; int lastIndex; };