Posted by: Gangadhar on: May 3, 2011
There might be some instances where you want to wait for the ENTER key from the user. And with a constraint stating ‘not to use’ any non-standard libraries. I faced this situation a while ago and found out a simple solution stated below: … std::cout << “Press ENTER to continue…”; std::cin.ignore( std::numeric_limits::max(), ‘\n’ ); … [...]