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