The problem is so simple you'll laugh...
Your loop says:
while there is no file failure (eof):
abc <-- read next record
display abc
What happens is this:
Read record one (no file read failure), display record one.
Read record two (no file read failure), display record two.
...
Read record N (no file read failure), display record N.
Read record N+1 (couldn't: file read failure), display record N (since abc == last record)
While loop terminates.
You need to test the file failure before displaying the record. There are a zillion ways to rewrite this, so I offer my way:
while (true)
{
if (! file.read( ... )) break;
abc.showdetails();
std::cout << std::endl;
}
Hope this helps.