We have a project that requires us to create a binary files with a struct of:
struct person_type
{
int age;
int id;
char name[20];
};
I have created the binary file(Person.txt).
Part 2 of the project is to read the binary file with a struct of:
struct index_type
{
int id;
int offset;
};
and write the index_type struct to a file(Index.txt)
I have created the 2nd file with the id number of file 1 & the offest for the record in file 1.
The 3rd part of the project is to sort the binary data (Index.txt) WITHOUT USING A READ ARRAY .. and then code any screen inquiries to the Index.txt file as a reference to the Index.txt file.
We are using Visual Studio 2005 for C (not C++).
There are another 4 sections of the assignment, and I should be able to finish the remaining parts, But I am at a loss as to how to sort the Index.txt file (in id order) without using a read array.
Any suggestions would be appreciated.
Cheers

New Topic/Question
Reply




MultiQuote





|