Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there a way to "pause" a for loop until input? 1

Status
Not open for further replies.

pauiel

Programmer
Jan 19, 2004
17
0
0
US
Is there a way to "pause" a for loop until input? -Daniel
 
cin.get() ;-)

If you use cin.get(), getline, cin >>, or anything like that the loop will stop executing until the user types something. Which you use depends on whether you want the loop to continue with any key being hit or only the enter key or whether you want to use what the user input. There are also non-portable methods discussed in other threads just below this one.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top