Learnem Educational
May 18, 2012, 12:52:59 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Reading inputs  (Read 1243 times)
Anonymous
Guest
« on: August 09, 2002, 04:41:03 PM »

Hi,

I have a C question, hope you guys can help me. I would like to read a single character from input. Now one can do this using scanf or getchar. However, I would like to read it as soon as the user press the key. In other words, the user doesn't have to hit the <Enter> key in order for the character to be processes.

Does anyone know how to do this? I remember doing it before, but it's been a while...

Thanks in advanced
« Last Edit: January 01, 1970, 12:00:00 AM by Anonymous » Logged
Anonymous
Guest
« Reply #1 on: August 28, 2002, 12:49:39 PM »

Now, If I can remember rightly.. which sometimes happens...

you can include conio.h, and use getch()

Hope this helps.
« Last Edit: January 01, 1970, 12:00:00 AM by Anonymous » Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!