home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / c / 12832 < prev    next >
Encoding:
Internet Message Format  |  1992-08-26  |  1.2 KB

  1. Path: sparky!uunet!wupost!travel!jon.ault
  2. From: jon.ault%travel@wugate.wustl.edu (Jon Ault) 
  3. Newsgroups: comp.lang.c
  4. Subject: How to fprintf two column
  5. Message-ID: <5663.87.uupcb@wugate.wustl.edu>
  6. Date: 26 Aug 92 20:52:00 GMT
  7. Distribution: world
  8. Organization: Travel Online, St. Louis, MO
  9. Reply-To: jon.ault%travel@wugate.wustl.edu (Jon Ault) 
  10. Lines: 20
  11.  
  12. VA. I need the following output to a file:
  13.   . 1.2     2.3
  14.   . 1.3     2.4                    1.4     2.5
  15.   . ....
  16.   . which contains two columns. They are not generated at the same 
  17.   . time, i.e. at the first the first column is generated and then 
  18.   . write to a file. then the file is rewinded and the second column is 
  19.   . generated. Now I need write the second column to that particular 
  20.   . place, say begin with 10th column. I have tried fseek() but it  
  21.   . seems to me not working. (?)
  22.  
  23. I would approach this by writing the first column out to a temp file, 
  24. then reading it back in and appending the second column, writing that 
  25. out to the final output file.  Or, save the first column in some kind 
  26. of array, then write both columns at once.
  27.  
  28. Jon
  29. ---
  30.  . DeLuxe./386 1.25 #124sa . 
  31.                                                                                                         
  32.