View Single Post
Old Jun 1st, 2006, 5:08 AM   #12
The Dark
Expert Programmer
 
Join Date: Jun 2005
Posts: 873
Rep Power: 4 The Dark is on a distinguished road
One way to sort the whole lot in your program is to read all the data into one big array, then sort the whole lot.
Do you still need the binary output files?
If not, just read each input file and add the data into a big array (you could use realloc to allocate memory). Then just call qsort once after all the files have been processed.
The Dark is offline   Reply With Quote