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

  1. Newsgroups: comp.os.msdos.apps
  2. Path: sparky!uunet!sun-barr!ames!haven.umd.edu!darwin.sura.net!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.024631.922@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:46:31 GMT
  11. Lines: 25
  12.  
  13.   I am currently writing a file sort that will sort an unknown number of
  14. entries in a file (from 600 to somewhere around 80,000).  I am going the rout
  15. of reading entries into memory, sorting them, outputing them to a temp file,
  16. renaming the temp file to temp1, reading in the next batch, sorting it, and
  17. then merging them with those already sorted in the file (repeat until EOF). 
  18. Unfortunately, when I use the system() command to rename the temp2 file to
  19. temp1, TC++ seems to reset the file pointer in my input file.  Either I am
  20. missing something increadably obvious and stupid, or the file pointer is
  21. pointed back to the begining of the input file by something I am unware of. 
  22. Could someone please let me know if TC++ closes all open files when it executes
  23. a system() command or will I have to go the path of using FSEEK() and FREAD()
  24. to read from the input file.  Any and all help is GREATLY appreciated.  By the
  25. way, this isn't for a school project, it's just for a database for a friend of
  26. mine.
  27.  
  28. ********************************************************************************
  29. *                       | What do I see?                                       *
  30. *                       | I see time as it affects all things . . .            *
  31. *   John White          | Human flesh withers and dies before my eyes. .       *
  32. *                       | Flowers bloom only to fade . . .                     *
  33. *   Libh@Jetson.uh.edu  | Trees drop green leaves, never to regain them        *
  34. *                       | In my sight. . .it is always winter. . .always night *
  35. *                       |                                     -- Raistlin --   *
  36. ********************************************************************************
  37.  
  38.