I have a homework program that i need some help with.
I am supposed to read information from a file and sort it according to the id. the data in the file looks like this
1001 joe 100.50
the id is the first field the name is the second and the dollar amount is the 3rd. I have tried using fgets to read the information in. it works so far but i dont know where to go from there. I need to do some error checking on the data that is read in as well.. such as
id should be between 1000-9999
name should be 10 or less characters
id should be unique.
any help with this is appreciated..