I have the following C++ program:
ofstream output("scores.txt");
output<<"John"<<" "<<"T"<<" "<<"Smith"<<" "<<90<<endl;
output<<"Eric"<<" "<<"K"<<" "<<"Jones"<<" "<<103<<endl;
output.close();
ifstream input;
input.open("scores.txt");
string line;
while (!input.eof()) {
getline(input, line);
cout<<line<<endl;
}
input.close();
cout<<"Done";
The output is:
John T Smith 90
Eric K Jones 103
Done
Why is there a blank line between Eric K Jones 103 and Done?