For starters, I suggest using either C style I/O or C++ style I/O, but not both at the same time.
Consequently, I would rewrite myflush() and mypause() as:
You would then only need to call mypause().Code:void myflush(std::istream& in) { in.clear(); in.ignore(std::numeric_limits<std::streamsize>::max(), '\n'); } void mypause() { std::cout << "Press [Enter] to continue . . ."; myflush(std::cin); std::cin.get(); }