A function that pauses

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Levale
    New Member
    • Jul 2008
    • 1

    A function that pauses

    Hello I'm new here.
    I need a function in 'C' that just pauses until the user hit's the enter key.
    I wanted to use getchar() however that function opens a stdio window which closes the main user window. So that's no good for me neither is scanf() it does the same thing.
    Next I decided to look in the ansi stdio.h file to find a keyboard function I know getchar() has to use some sort of keyboard() to get the characters.
    however the stdio.h stuff does not clearly show how getchar() is written or perhaps my windows system is not showing me clearly.

    SO can someone please point me to a function such keyboard and where it is located in the ansi 'C' library. Or even one you have written yourself.
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    Originally posted by Levale
    I wanted to use getchar() however that function opens a stdio window which closes the main user window.
    You mean it closes the current console window and opens a new one? or that the program has a GUI Window and that gets shut and a console (stdio) window is opened?

    Comment

    • MrPickle
      New Member
      • Jul 2008
      • 100

      #3
      I'm not sure whether or not it's C but I know this function:

      system("pause") ;

      Comment

      • gpraghuram
        Recognized Expert Top Contributor
        • Mar 2007
        • 1275

        #4
        you can use getchar() for this...

        Raghu

        Comment

        Working...