Extract data from a file

Hi, I need help creating a function that extract data from a file for a collection. Here is the decleration of the function:

/**
* Extracts data from a file for a collection of courses.
* Courses contain a title, crn, days, time and instructor
* @param aInputFile the stream to retrieve data for courses
* @param aCourses the collection of courses
* @pre the stream must be opened and ready to read data from.
* the collection of courses must be large enough
* to hold all courses within an input file, i.e.,
* the collection can't be size 1 if there are 100
* courses in the input file.
* @post the stream has extracted all the data for courses and stopped
* at an eof. The collection of courses contains all the
* course data from the stream.
* @return the number of courses constructed as a result of the extraction
* @see Courses.h
*/
int putDataInCourses(/* fill in param list */);

And here is the data from the file:

courseOneTitle,courseOneCRN,courseOneDays,courseOneTime,courseOneInstructor\n
courseTwoTitle,courseTwoCRN,courseTwoDays,courseTwoTime,courseTwoInstructor\n

I don't really understanding what I am suppose to do here for this function so it would be great if someone can help me. Thanks
Topic archived. No new replies allowed.