... void pairoff(StringTree * t1, StringTree * t2) { Enumeration lister1(t1), lister2(t2); while (lister1.hasmore() || lister2.hasmore()) { string s1 = "", s2 = ""; if (lister1.hasmore()) s1=lister1.getnext(); if (lister2.hasmore()) s2=lister2.getnext(); spaces(20-s1.length()); cout << s1 << " - " << s2 << "\n"; } } void main(void) { cout << "enter:\n"; cout << " 1 word to insert word in tree one\n"; cout << " 2 word to insert word in tree two\n"; cout << " p to pair off trees\n"; cout << " x to exit\n"; StringTree * tree1 = NULL, * tree2 = NULL; while (1) { cout << "> "; string command; cin >> command; if (command=="1") { string operand; cin >> operand; insert(tree1, operand); cout << operand << " inserted into tree 1\n"; } else if (command=="2") { string operand; cin >> operand; insert(tree2, operand); cout << operand << " inserted into tree 2\n"; } else if (command=="p") { pairoff(tree1, tree2); } else if (command=="x") { break; } else { cout << "Get it right.\n"; } } } ...