+ 5
Jan is spot on here. Check out an example:
This is pseudo code. You might have:
string s;
s = get_line_from_file(fp);
while (s != EOF)
{
s = get_line_from_file(fp);
}
You can refactor the code, to get:
string s;
do
{
s = get_line_from_file(fp);
}
while (s != EOF);