reading input w/o hitting enter?

This is a discussion on reading input w/o hitting enter? within the C Programming forums, part of the General Programming Boards category; Ok so heres my question. can i make it so that whenever the user enters something, it reads the character ...

  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,006
    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, 11:26 AM
  4. Replies: 2
    Last Post: 10-10-2002, 12:22 AM
  5. Reading integers until end of input
    By nivo in forum C Programming
    Replies: 7
    Last Post: 10-20-2001, 05:18 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21