|
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.
|