Thread: Getch() like function

  1. #1
    Registered User mr_raging_money's Avatar
    Join Date
    Mar 2012
    Posts
    18

    Exclamation non-blocking keyboard input

    I am looking for a function like getch(), where you don't have to press enter after entering a character, but will continure even if there is no input given.

    Or, is there a way to make my program continure without waiting for a character if nothing is pressed?

    non-blocking keyboard input
    Last edited by mr_raging_money; 03-22-2012 at 07:35 PM.

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    If you know enough to call it "non-blocking keyboard input", then you should know enough to Google what you're looking for.

    Let me google that for you


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

  3. #3
    Registered User mr_raging_money's Avatar
    Join Date
    Mar 2012
    Posts
    18
    I found one, kbhit(), but my keyboard input doesn't work now. I was using int ch=getch(); before, and I replaced getch() with kbhit(), and now it doesn't work.
    Is there another function, the only answers I have found have been overly confusing or don't seem to talk about the same thing.

  4. #4
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    You should have discovered, in your extensive googling, that it is entirely OS/compiler specific, and then consulted your compiler's documentation and/or library functions available for said compiler.


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

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getch Refresh? Simple Problems with Getch()
    By justin777 in forum C Programming
    Replies: 7
    Last Post: 10-26-2011, 01:21 AM
  2. Replies: 5
    Last Post: 11-26-2002, 10:34 PM
  3. Making a getch and kbhit function?
    By Brian in forum C Programming
    Replies: 2
    Last Post: 03-03-2002, 11:50 AM
  4. need help with getch
    By adrive in forum C++ Programming
    Replies: 4
    Last Post: 03-03-2002, 04:45 AM
  5. Using getch() function
    By BigSter in forum C++ Programming
    Replies: 8
    Last Post: 12-03-2001, 11:05 AM