detect if there are caracteres in stdin.

M

Mug

hi,
i'm looking for a fonction, which can detect if i have entered
someting with my keyboard.
when i use fgetc() of getchar() or scanf, i need to press "enter" to
let it know that i typed something in terminal,
i need something like:
enter caracter here without press enter:
xx

here i enter the caracter x,without press enter, it print it out
imediatly.
 
B

Ben Bacarisse

Mug said:
hi,
i'm looking for a fonction, which can detect if i have entered
someting with my keyboard.
when i use fgetc() of getchar() or scanf, i need to press "enter" to
let it know that i typed something in terminal,

The answer depends on what system you are using and, also, on exactly
what you mean by the keyboard (yes, I know it sounds odd!).

Ask in group that deals with your system.

<snip>
 
R

Richard Bos

Mug said:
i'm looking for a fonction, which can detect if i have entered
someting with my keyboard.

You need to read the comp.lang.c FAQ (at <http://c-faq.com/>). The
section called "System Dependencies" (nr. 19, if it hasn't changed),
first and second questions.

Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top