home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!mcsun!Germany.EU.net!news.netmbx.de!mailgzrz.TU-Berlin.DE!math.fu-berlin.de!informatik.tu-muenchen.de!lrz-muenchen.de!regent!pal
- From: pal@regent.e-technik.tu-muenchen.dbp.de (Peter Loibl)
- Subject: Re: Getting input from the keyboard
- Message-ID: <pal.724501355@regent.e-technik.tu-muenchen.de>
- Sender: news@regent.e-technik.tu-muenchen.de (News System)
- Organization: Technical University of Munich, Germany
- References: <1992Dec14.212611.12032@cs.mun.ca>
- Date: Wed, 16 Dec 1992 10:22:35 GMT
- Lines: 26
-
- paulk@garfield.cs.mun.ca (Paul E. King) writes:
-
- [stuff deleted]
-
- >I want to know how C can obtain input from the keyboard directly,
- >without my having to type a carriage return. I know that the vi editor
- >works on this principle (that is what I am using now).
-
- [stuff deleted]
-
- >I am using a UNIX-based System V Berekley C compiler.
-
- [stuff deleted]
-
- Hi!
-
- getc(FILE *stream) reads one single character from a certain stream.
- Streams are: open files, stdin and stderr (stdout is also one, but
- this makes little sense here).
-
- You should try getc(stdin).
-
- More details are on the manual pages.
-
- Peter Loibl
- pal@regent.e-technik.tu-muenchen.de
-