Re: stdin help
- From: "Robert Gamble" <rgamble99@xxxxxxxxx>
- Date: 4 Jan 2006 10:32:55 -0800
sajjanharudit@xxxxxxxxx wrote:
> i need to check the stdin, repeatedly for an input form the keyboard,
> with out prompting the user to press a key or without returning pressed
> key on screen..
>
> now the problem is that if i use getc() the program execution stpos at
> this line and waits for the user to press a key. cant use getchar
> because the key pressed appears on the screen and moreover it is
> buffered.
>
> what i need is a small technique whereby which I can check the stdin
> for an input, without prompting the user(the user will enter a key as
> and when he wishes, not depending on the program) AND without halting
> the execution (as getc() does) AND without displaying the key on the
> screen AND should store the pressed key to variable
There is no way to do what you are looking for in Standard C but many
platforms provide non-blocking input handling functions that will allow
you to check if there is input waiting and act accordingly. You will
need to check your implementation's documentation or post to a group
that deals with your platform for the details.
Robert Gamble
.
- Follow-Ups:
- Re: stdin help
- From: sajjanharudit@xxxxxxxxx
- Re: stdin help
- References:
- stdin help
- From: sajjanharudit@xxxxxxxxx
- stdin help
- Prev by Date: Re: regarding "goto" in C
- Next by Date: Re: stdin help
- Previous by thread: Re: stdin help
- Next by thread: Re: stdin help
- Index(es):
Relevant Pages
|