Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sorting text file

Status
Not open for further replies.

shrismail

Programmer
Oct 2, 2001
2
IN
hi
i want to sort a text file with apprx 3,00,000 records with each record being record being 100 k size.

the file has to be sorted on the first field of the record.

the whole file should not be loaded into memory for sorting.


can anyone please suggest an appropriate algorithm for the same?


what i am looking for is something similar to the sort command in UNIX.
 
I am a bit confused... what are you sorting on??? Asside from that, <sort.h> has a function called qsort which could prove useful as well as a function called bsearch which you would need to write a compare function for.

Matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top