home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.msdos.apps
- Path: sparky!uunet!sun-barr!ames!haven.umd.edu!darwin.sura.net!zaphod.mps.ohio-state.edu!menudo.uh.edu!Jane.UH.EDU!LIBH
- From: libh@Jane.UH.EDU
- Subject: C Question
- Message-ID: <1992Sep16.024631.922@menudo.uh.edu>
- Sender: usenet@menudo.uh.edu (USENET News System)
- Nntp-Posting-Host: jane.uh.edu
- Reply-To: libh@Jane.UH.EDU
- Organization: University of Houston
- Date: Wed, 16 Sep 1992 02:46:31 GMT
- Lines: 25
-
- I am currently writing a file sort that will sort an unknown number of
- entries in a file (from 600 to somewhere around 80,000). I am going the rout
- of reading entries into memory, sorting them, outputing them to a temp file,
- renaming the temp file to temp1, reading in the next batch, sorting it, and
- then merging them with those already sorted in the file (repeat until EOF).
- Unfortunately, when I use the system() command to rename the temp2 file to
- temp1, TC++ seems to reset the file pointer in my input file. Either I am
- missing something increadably obvious and stupid, or the file pointer is
- pointed back to the begining of the input file by something I am unware of.
- Could someone please let me know if TC++ closes all open files when it executes
- a system() command or will I have to go the path of using FSEEK() and FREAD()
- to read from the input file. Any and all help is GREATLY appreciated. By the
- way, this isn't for a school project, it's just for a database for a friend of
- mine.
-
- ********************************************************************************
- * | What do I see? *
- * | I see time as it affects all things . . . *
- * John White | Human flesh withers and dies before my eyes. . *
- * | Flowers bloom only to fade . . . *
- * Libh@Jetson.uh.edu | Trees drop green leaves, never to regain them *
- * | In my sight. . .it is always winter. . .always night *
- * | -- Raistlin -- *
- ********************************************************************************
-
-