outputFile << left << setw(20) << Player
<< right << setw(9) << Pawn
<< right << setw(11) << Knight
<< right << setw(12) << Bishop
<< right << setw(11) << Rook
<< right << setw(11) << Queen
<< right << setw(11) << Total << endl;
}
while (!inputFile.eof());
inputFile.close();
return 0;
}
cout << "What is the input file: ";
cin >> inFile;
inputFile.open(inFile);
cout << "What is the output file: ";
cin >> outFile;
located INSIDE your do/while loop. So you will be be asked for a name of input file each time the EOF is not reached, and it's probably starting at the top of the file each time through since the open file is run in each pass. Move those out of the do/while and see if you see an improvement
@jay6390 an example of the input file would be
Robert Smith
4 2 1 2 1
Jane Doe
3 1 1 2 1
@whitenite1
I understand what your saying but as to where i should move those commands to i am lost. I tried moving it out but my program stopped doing anything at all, and that is probably due to my error of not knowing where to move them to.