Sorting Values From Input File to array

Hello, Im having trouble sorting values from an input file into three separate arrays, one holding studentID numbers, a parallel array holding the students respective testAvg, and a final parallel array holding the students respective programAvg. I am opening the file fine, but Im having trouble using the buildAr() function. As a side note, the input file has has the studentID first, the testAvg second and the programAvg third, like this:

123456
96.29
87.00
789012
23.87
73.25
345678
18.23
25.75

This is what I have so far:

while (inFile )
{
int buildAr( int student [], double program [], double test [] );

int i = 0;

inFile.getline studentID;

inFile.close();

cout << studentID;

};

I know this is wrong and isn't very complex, but I would appreciate any insight on how to use this function correctly. I also assume that there needs to be a for loop that dictates where each input value goes (studentID, testAvg, programAvg).
Topic archived. No new replies allowed.