C Enter Any Key to Continue
"Press any key to continue"
"Press any key to continue"
Author | Message |
---|---|
"Press any key to continue" I have run out of idea printf ("Press any key to continue"); regards | |
Tue, 18 Dec 2001 03:00:00 GMT | |
"Press any key to continue" Quote: >I have run out of idea >printf ("Press any key to continue"); Unfortunately, there is no *standard* function that is specifically defined to Grant D. Watson | |
Tue, 18 Dec 2001 03:00:00 GMT | |
"Press any key to continue" Quote: >if its not too complicated, maybe someone write a code for "press any key to There is no portable way to do this. Please see the comp.lang.c FAQ, 19.1: How can I read a single character from the keyboard without That being said, there are probably many non-portable ways to do this -- | |
Tue, 18 Dec 2001 03:00:00 GMT | |
"Press any key to continue" Hi, printf ("Press any key to continue"); You can specify specific keys that exit etc. Quote: > I have run out of idea > printf ("Press any key to continue"); > regards | |
Tue, 18 Dec 2001 03:00:00 GMT | |
"Press any key to continue" Quote: >Hi, >printf ("Press any key to continue"); 1. NEVER use gets(). Quote: >You can specify specific keys that exit etc. It didn't. Please read the FAQ and this group's newsfeed for a few weeks Gergo -- He asked his mother, "Why doesn't HE have a lollipop?" Her reply: "He can have a lollipop any time he wants to. That's what it GU d- s:+ a--- C++>$ UL+++ P>++ L+++ E>++ W+ N++ o? K- w--- !O !M !V | |
Tue, 18 Dec 2001 03:00:00 GMT | |
"Press any key to continue" Quote: > My lecturer at college told me that you specify a variable in the function >printf ("Press any key to continue"); Ah, but you need to terminate the string with a newline. This does not -- | |
Tue, 18 Dec 2001 03:00:00 GMT | |
"Press any key to continue" [...] : printf ("Press any key to continue"); Either you understood your lecturer incorrectly, or your lecturer First of all, gets() requires a char * as parameter, not char. 12.23: Why does everyone say not to use gets()? | |
Tue, 18 Dec 2001 03:00:00 GMT | |
"Press any key to continue" The closes I could get is to use 2 identical lines of getchar() like this... which will accept return key and other character keys... but I know this is regards, Quote: >I have run out of idea >printf ("Press any key to continue"); >regards | |
Wed, 19 Dec 2001 03:00:00 GMT | |
"Press any key to continue" Quote: >The closes I could get is to use 2 identical lines of getchar() like this... >which will accept return key and other character keys... but I know this is Use fgets(). Gergo -- GU d- s:+ a--- C++>$ UL+++ P>++ L+++ E>++ W+ N++ o? K- w--- !O !M !V | |
Wed, 19 Dec 2001 03:00:00 GMT | |
"Press any key to continue" There is no portable way to do that, so the answer is platform specific. # include <conio.h> main() Quote: } Also check out a funtion called clrscr() in conio.h for clearing the screen! Quote: > >I have run out of idea > >printf ("Press any key to continue"); | |
Wed, 19 Dec 2001 03:00:00 GMT | |
"Press any key to continue" Quote: >The closes I could get is to use 2 identical lines of getchar() like this... >which will accept return key and other character keys... but I know this is To wait for a RETURN/ENTER (or equivalent) key to be pressed try this: int ch; while ((ch = getchar()) != EOF && ch != '\n') -- ----------------------------------------- | |
Wed, 19 Dec 2001 03:00:00 GMT | |
barrettmationsills.blogspot.com
Source: http://computer-programming-forum.com/47-c-language/1303a5269e5ccab4.htm
0 Response to "C Enter Any Key to Continue"
Post a Comment