Thread: reading input w/o hitting enter?

  1. #1
    Registered User Aalmaron's Avatar
    Join Date
    Jan 2004
    Location
    In front of a monitor
    Posts
    48

    reading input w/o hitting enter?

    Ok so heres my question. can i make it so that whenever the user enters something, it reads the character right away and acts acordingly?

    heres a senario. 1, 2, and 3 are assigned to something. if they enter in anything, it checks to see if its 1, 2 or 3. if not, it deletes the input and waits for 1, 2, or 3. when 1, 2, or 3 is hit, it does something acording.

    any ideas?
    thanks!

  2. #2
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,005
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 7
    Last Post: 02-02-2009, 07:27 AM
  2. reading in no input
    By danojt in forum C++ Programming
    Replies: 9
    Last Post: 11-15-2006, 08:28 PM
  3. Hitting enter while FOCUS on an EDIT
    By Garfield in forum Windows Programming
    Replies: 8
    Last Post: 09-02-2003, 10:26 AM
  4. Replies: 2
    Last Post: 10-09-2002, 11:22 PM
  5. Reading integers until end of input
    By nivo in forum C Programming
    Replies: 7
    Last Post: 10-20-2001, 04:18 PM