// File: main3.C // // Testing the BSTree class. #include #include #include #include "bstree.h" #include "bstring5.h" main() { try { BSTree *Tptr ; Tptr = new BSTree ; Tptr->insert("Space,") ; Tptr->insert("the") ; Tptr->insert("final") ; Tptr->insert("frontier.") ; Tptr->insert("These") ; Tptr->insert("are") ; Tptr->insert("the") ; Tptr->insert("voyages") ; Tptr->insert("of") ; Tptr->insert("the") ; Tptr->insert("Starship") ; Tptr->insert("Enterprise.") ; Tptr->inorder() ; cout << endl ; delete Tptr ; } catch (MemoryError& e) { cerr << "Out of memory" << endl ; exit(1) ; } catch (...) { cerr << "Caught Unknown error" << endl ; exit(1) ; }}