//==clearScreen=========================================== // pre: on an operating system that understands signals // post: clears a terminal window //======================================================== void clearScreen() { cout << char(27) << "[;H" << char(27) << "[2J" << '\n'; } //==waitForKeyPress=========================================== // pre: none // post: has read a key press input form the keyboard and // consumed that key //======================================================== void waitForKeyPress() { cout << "Press to continue."; cin.ignore(); cin.ignore(); }