Press enter to continue
From: junk mail (michael.rook_at_ntlworld.com)
Date: 02/28/04
- Next message: Joona I Palaste: "Re: Press enter to continue"
- Previous message: Joona I Palaste: "Re: Troll Alert: [OT] Efficiency of math.h"
- Next in thread: Joona I Palaste: "Re: Press enter to continue"
- Reply: Joona I Palaste: "Re: Press enter to continue"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 28 Feb 2004 15:51:06 -0000
My friend is trying to code a small c program where he wants to force the
user to press enter and only enter to continue.
Currently he is using getchar() with a loop but you can type any number of
characters, which are echoed to screen before you have to press enter.
For example:-
do
{ /* Begin loop */
printf("\Press Enter"); /* Output to screen */
} while ((ch = getchar()) != '\n') ; /* While ( Condition -
must press enter ) */
- Next message: Joona I Palaste: "Re: Press enter to continue"
- Previous message: Joona I Palaste: "Re: Troll Alert: [OT] Efficiency of math.h"
- Next in thread: Joona I Palaste: "Re: Press enter to continue"
- Reply: Joona I Palaste: "Re: Press enter to continue"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|