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:
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).