Any suggestions on how I should read in this file?.:Resolved:.
Hello everyone, I have a file set up like this:
100 93
43 30
80 70
... ...
these grades are seperated by a tab character, the first column is lab 1, the second column is lab 2, I want to seperate these 2 columns and manipulate them seperately, like, I will have to find the average of them, the mode of them, and the min and max of each lab, any idea's? I was trying to seperate them into 2 different arrays, but thats not working too well!
Code:
int array1[500];
int array2[500];
int one;
int two;
char ch;
char newline;
int i =0;
while(!inFile.eof())
{
inFile >>one>>ch>>two>>newline;
array1[i] = one;
array2[i] = two;
i++;
}
thanks!
:wave: