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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

hitting ENTER before the next screen is shown

Status
Not open for further replies.

cathycena

Programmer
Jan 1, 2002
2
PH
I'm having trouble with a project.
The display or output is a table that may have more rows that can fit into one screen. In this case, the program should stop the display and prompt the user to hit ENTER before the next screen is shown. This will be done as many times as necessary. How do you do that?
Thanks for all the help. :)
 
when you're printing out your table keep a counter of how many lines you've printed. when you a point where the number of lines modulo the number of lines you can fit on the screen(minus the line saying press return<or any key for that matter>) print out the line saying press any key to continue and then do a getchar. that should work if I understand your problem correctly. good luck. MYenigmaSELF:-9
myenigmaself@yahoo.com
 
If the program is &quot;skipping&quot; past your first text screen, issue the following command to clear the input buffer:

_flushall();

before getting into your printing code and your getch() or whatever().

Hope that helps to solve the problem. X-)
 
use the following syntax for the user to enter return key only to proceed to the next screen. any other key would cause the cursor to move further.

SYNTAX:

cin.get()





icici

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top