#include "stdstuff.h" #include "VarTreeNode.h" void realMain () { String2002 str; VarTreeNode *root; for (;;) { cout << "\nEnter a variable (STOP to terminate).\n: "; cin >> str; if (str.isEqualCaseInsensitive("STOP")) return; cout << endl; // space the output if ((root = createVarTree (str)) == NULL) { cout << "That is not a valid variable.\n"; } else { cout << "The variable is valid. Its form is "; outputVariable(root); cout << ".\n"; deleteVarTree (root); } } } int main () { try { realMain (); } catch (exception &e) { // catches all uncaught exceptions cout << "\nException <" << e.what() << "> occurred.\n"; } pause (); return 0; }