#ifndef _GUESS_H #define _GUESS_H class GuessGame { public: GuessGame(); // initialize properly ~GuessGame(); // return new'd memory to heap, clean up // accessor and debugging functions void Print() const; // print the "tree" used in the game // mutator (read/write/play) functions void ReadFile(const string & filename); // read from named file void WriteFile(const string & filename); // write to named file void Play(); // play the game private: struct TreeNode // standard Tree node { string info; TreeNode * left; TreeNode * right; TreeNode(const string & s, TreeNode * lchild = 0, TreeNode * rchild = 0) : info(s), left(lchild), right(rchild) { } }; TreeNode * myRoot; // root of guessin tree // helper functions (need tree parameter) void DoDelete(TreeNode * root); // delete tree at root void DoWrite(ostream & output,TreeNode * root) const; // print tree void BuildTree(istream & input,TreeNode * & root); // build tree }; #endif