I have a mini-assignment to do at University over the next two weeks or so, to be written in C, but the trouble is, I haven't written a line of C in nearly 2 years, so I am extremely rusty. Anyway, here is what I need help with:
I have data in a file in the following format (comma seperated)
Origin,Destination,Flight No.,Aircraft type,Days of week,Departure time,Arrival time,Begin Date,End Date
Essentially, what I have to do is read the data contained in this file into an array in order to run a search function on it.
The file is absolutely huge, but we were told that if we can get it to work on about 10 lines of data, there is no reason why it shouldn't work with a larger file.
I have absolutely no idea how to go about reading this data into an array. I have a C book which briefly covers opening files, but it doesn't mention comma-seperated data in files.
Any help on this really would be appreciated, as I have absolutely no idea how to do this. Once I have the data in an array, I should be able to muddle through it, but getting started is the problem.
Thanks in advance for your help.