home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / c / 18456 < prev    next >
Encoding:
Text File  |  1992-12-16  |  1.2 KB  |  38 lines

  1. Newsgroups: comp.lang.c
  2. 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
  3. From: pal@regent.e-technik.tu-muenchen.dbp.de (Peter Loibl)
  4. Subject: Re: Getting input from the keyboard
  5. Message-ID: <pal.724501355@regent.e-technik.tu-muenchen.de>
  6. Sender: news@regent.e-technik.tu-muenchen.de (News System)
  7. Organization: Technical University of Munich, Germany
  8. References: <1992Dec14.212611.12032@cs.mun.ca>
  9. Date: Wed, 16 Dec 1992 10:22:35 GMT
  10. Lines: 26
  11.  
  12. paulk@garfield.cs.mun.ca (Paul E. King) writes:
  13.  
  14. [stuff deleted]
  15.  
  16. >I want to know how C  can obtain input from the keyboard directly,
  17. >without my having to type a carriage return. I know that the vi editor 
  18. >works on this principle (that is what I am using now). 
  19.  
  20. [stuff deleted]
  21.  
  22. >I am using a UNIX-based System V Berekley C compiler.
  23.  
  24. [stuff deleted]
  25.  
  26. Hi!
  27.  
  28. getc(FILE *stream) reads one single character from a certain stream.
  29. Streams are: open files, stdin and stderr (stdout is also one, but
  30. this makes little sense here).
  31.  
  32. You should try getc(stdin).
  33.  
  34. More details are on the manual pages.
  35.  
  36. Peter Loibl
  37. pal@regent.e-technik.tu-muenchen.de
  38.