home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / os / msdos / programm / 9387 < prev    next >
Encoding:
Text File  |  1992-09-15  |  2.2 KB  |  39 lines

  1. Newsgroups: comp.os.msdos.programmer
  2. Path: sparky!uunet!elroy.jpl.nasa.gov!usc!zaphod.mps.ohio-state.edu!menudo.uh.edu!Jane.UH.EDU!LIBH
  3. From: libh@Jane.UH.EDU
  4. Subject: C Question
  5. Message-ID: <1992Sep16.025709.1473@menudo.uh.edu>
  6. Sender: usenet@menudo.uh.edu (USENET News System)
  7. Nntp-Posting-Host: jane.uh.edu
  8. Reply-To: libh@Jane.UH.EDU
  9. Organization: University of Houston
  10. Date: Wed, 16 Sep 1992 02:57:09 GMT
  11. Lines: 26
  12.  
  13.   I am currently writing a file sort in TC++ 3.0 that will sort a file with an
  14. unknown number of entries (in the range of 600 to 80,000).  I am reading the
  15. entries until memory if full, sorting them, writing them to a temp file,
  16. reading in the next batch of entries from the file, sorting them in memory, and
  17. then merging them with the temp file into temp2.  Then I use SYSTEM() to rename
  18. temp2 to temp and continue on reading, sorting, and merging until I get an end
  19. of file from the input file.  The problem I face is that the SYSTEM() seems to
  20. be resetting the file pointer to my input file (which I leave open until
  21. finished) back to the beginning of the file.  Could someone please let me know
  22. if I am just missing something painfully obvious and stupid or does the
  23. SYSTEM() function close all open files when it executes (None of these
  24. supposedly large bookstore chains carry a TC++ Bible).  If SYSTEM() closes all
  25. open files then using FSEEK() and FREAD() seem to be the next choice for input
  26. rather than FGETS().  Thanks in advance for any and all help.  And as a side
  27. note, this isn't for a school project.
  28.  
  29. ********************************************************************************
  30. *                       | What do I see?                                       *
  31. *                       | I see time as it affects all things . . .            *
  32. *   John White          | Human flesh withers and dies before my eyes. .       *
  33. *                       | Flowers bloom only to fade . . .                     *
  34. *   Libh@Jetson.uh.edu  | Trees drop green leaves, never to regain them        *
  35. *                       | In my sight. . .it is always winter. . .always night *
  36. *                       |                                     -- Raistlin --   *
  37. ********************************************************************************
  38.  
  39.