View Single Post
Old 10-23-2004, 11:54 AM   #2 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,544
Valmont is on a distinguished road
You will need to build your own functions. Copy and paste this to a file to back it up.
Code:
#include <string>
#include <climits>

using namespace std;

void reset_istream( )
{
   //Reset failstate just in case.
  cin.clear();
   cin.ignore(numeric_limits<streamsize>::max(), '\n');
}

//--------------------------------------------------- void wait_for_enter()
{
  cout << "press <enter> to continue...\n";
  // Reset failstate, just in case.
  cin.clear();
  string line;
  getline( cin, line);
}
You can see in this thread:
http://codenewbie.com/forum/showthre...&threadid=2482
how to use it.
__________________

Last edited by Valmont; 10-23-2004 at 01:16 PM.
Valmont is offline   Reply With Quote