Thread overview
Getchar()
Apr 21, 2005
Andreas Schmid
Apr 21, 2005
zwang
Apr 21, 2005
TechnoZeus
Apr 21, 2005
Andreas Schmid
Apr 21, 2005
TechnoZeus
Apr 21, 2005
Stewart Gordon
April 21, 2005
Shouldn't getchar() read on character and then return? It always reads a whole line here.

-Andreas


April 21, 2005
Andreas Schmid wrote:
> Shouldn't getchar() read on character and then return? It always reads a whole line here.
> 
> -Andreas 
> 
> 

This is exactly the same standard behavior of C's getchar().
April 21, 2005
Which getchar() on which operating system?

TZ

"Andreas Schmid" <monkey@gmx.info> wrote in message news:d48c0u$3jr$1@digitaldaemon.com...
> Shouldn't getchar() read on character and then return? It always reads a
> whole line here.
>
> -Andreas
>
>


April 21, 2005
Windows XP.

"TechnoZeus" <TechnoZeus@PeoplePC.com> wrote in message news:d48hqs$943$1@digitaldaemon.com...
> Which getchar() on which operating system?
>
> TZ
>
> "Andreas Schmid" <monkey@gmx.info> wrote in message news:d48c0u$3jr$1@digitaldaemon.com...
>> Shouldn't getchar() read on character and then return? It always reads a
>> whole line here.
>>
>> -Andreas
>>
>>
>
> 


April 21, 2005
Which getchar ?  and is that compiled and linked for Windows, or as a Dos program?

TZ

"Andreas Schmid" <monkey@gmx.info> wrote in message news:d48j2l$ai0$1@digitaldaemon.com...
> Windows XP.
>
> "TechnoZeus" <TechnoZeus@PeoplePC.com> wrote in message news:d48hqs$943$1@digitaldaemon.com...
> > Which getchar() on which operating system?
> >
> > TZ
> >
> > "Andreas Schmid" <monkey@gmx.info> wrote in message news:d48c0u$3jr$1@digitaldaemon.com...
> >> Shouldn't getchar() read on character and then return? It always reads a
> >> whole line here.
> >>
> >> -Andreas
> >>
> >>
> >
> >
>
>


April 21, 2005
Andreas Schmid wrote:
> Shouldn't getchar() read on character and then return? It always reads a whole line here.

Yes, because it reads from the standard input, and that's the way the standard input works.

To read a single keystroke, use getch.

Stewart.

-- 
My e-mail is valid but not my primary mailbox.  Please keep replies on the 'group where everyone may benefit.