Thread: Exit on key press?

  1. #1
    dazed
    Guest

    Question Exit on key press?

    I know this is really simple but how would I make a program that when it is done running it will ask you to press any key to exit?

    How would I create that part? A while statement?

    thanks

  2. #2
    dazed
    Guest

    Talking

    Wow that was fast!!
    thanks

    Oh, and I am using borland

  3. #3
    Registered User
    Join Date
    Nov 2002
    Posts
    29
    You can also use 'system("pause");'
    stdlib.h

  4. #4
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Originally posted by WolfPack
    You can also use 'system("pause");'
    stdlib.h
    Unless of course you system doesn't have a "pause" command, which very well may be the case. In short, yes you can, the long answer, no you sholdn't.

    Quzah.
    Hope is the first step on the road to disappointment.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 16
    Last Post: 11-23-2007, 01:48 PM
  2. Virtual keys
    By Arkanos in forum Windows Programming
    Replies: 4
    Last Post: 12-12-2005, 10:00 AM
  3. Directional Keys - Useing in Console
    By RoD in forum C++ Programming
    Replies: 38
    Last Post: 10-06-2002, 04:42 PM
  4. FAQ: Directional Keys - Useing in Console
    By RoD in forum FAQ Board
    Replies: 38
    Last Post: 10-06-2002, 04:42 PM