so my file won't rewind properly despite doing what my instructor told me to do. So i'm doing this.
inputFile.clear();
inputFile.seekg(0);
right before doing this.
while (inputFile >> name)
{
if (sex == "M")
{
mCount++;
mTotal = mTotal + score;
}
else if (sex == "F")
{
fCount++;
fTotal = fTotal + score;
}
if (college == "CC")
{
ccCount++;
ccTotal = ccTotal + score;
}
else if (college == "UN")
{
unCount++;
unTotal = unTotal + score;
}
Count++;
Total = Total + score;
}
but instead of doing what it should the file simply reads the last line instead of the entire .txt file and i don't know why.