home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / c / 16983 < prev    next >
Encoding:
Text File  |  1992-11-21  |  934 b   |  29 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!sun-barr!ames!daffodil!wyvern!waggen!alpha
  3. From: alpha@waggen.twuug.com (Joe Wright)
  4. Subject: Re: write an int?
  5. Message-ID: <1992Nov22.000330.19443@waggen.twuug.com>
  6. Organization: ALPHA, Box 68621, Va. Beach, VA 23455
  7. X-Newsreader: TIN [version 1.1 PL6]
  8. References: <Nov.19.19.08.57.1992.14534@ratt.rutgers.edu>
  9. Date: Sun, 22 Nov 1992 00:03:30 GMT
  10. Lines: 17
  11.  
  12. O. C. (map@ratt.rutgers.edu) wrote:
  13. : I want to write an integer to a text file using the Unix system call
  14. : write,
  15. : write(file descriptor,buffer,size);
  16. : but I can only seem to get it to work for strings and characters.
  17. : What am I doing wrong?
  18.  
  19. Why write().  Why not C's fwrite()?  In any case, an integer is not
  20. text.  Use fprintf() to convert an int to text on the output file.
  21.  
  22. -- 
  23. Joe Wright  alpha@waggen.twuug.com  
  24. "If we could only see the source code.."  (Dave Olson)
  25.