Thread: Keypress

  1. #1
    Registered User
    Join Date
    Oct 2001
    Posts
    6

    Unhappy Keypress

    Well,
    I need to know the basics of keypresses in C++, And I have no idea where to start.

    The main point of this is because when I run one of my (dodgy) console apps in windows, it closes straight after the commands are done.

    Plz help me out..

  2. #2
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  3. #3
    Registered User
    Join Date
    Oct 2001
    Posts
    6
    oh ok thanks,

    Do you know where I can find out how to make it detect a specific key?

  4. #4
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    getch() returns the key pressed, look it up in the help.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. (MFC, Visual C++) Keypress Detection in a dialog...
    By guitarist809 in forum Windows Programming
    Replies: 4
    Last Post: 08-31-2008, 01:13 PM
  2. Detecting keypress
    By dandago in forum C Programming
    Replies: 4
    Last Post: 06-10-2007, 09:34 AM
  3. Determining Length of Keypress
    By Nascent in forum C++ Programming
    Replies: 3
    Last Post: 11-30-2005, 03:37 PM
  4. Length of keypress question
    By Nascent in forum Windows Programming
    Replies: 4
    Last Post: 11-30-2005, 02:48 PM
  5. Getting input without waiting for keypress
    By Ink in forum C Programming
    Replies: 4
    Last Post: 10-01-2004, 01:38 AM