In the C++ course i'm taking, my teacher gave us a project to sort massive amounts of records. We need to sort 10,000,000 (ten mil) records. Each record consists of 9 fields, area code, prefix, line number, 5-digit zip code, month number, day number, year number, GPA, First Name, and Last Name (2 strings, 1 double, 6 ints/shorts). a sample record could be "879 722 1794 60809 05 9 2522 4.45955 Timothy Solomon". The comparison will rely on nested fields. All 9 fields will be somewhere in the nesting order/hierarchy. The first obstacle is RAM. But the records are possible to be stored on the hdd (according to my calculations the records could take up to 560mbs). So the use of an external merge sort with two scratch files is an option. The problem is i tried doing this but the output file is messed up and contains weird characters and contains weird and irrelevant numbers for some reason. Also, it takes it quite a while to just sort 10,000 records. I thought maybe anyone here could help me with making this program. Our teacher gave us access to the small program he made to create random records. It is attached (i tried putting it here but it's too long). Can anyone please help me with this program. It needs to be very efficient and fast and i'm not that great at optimization, never liked optimizing my code. Thanks.