S
SpreadTooThin
I just did a loop
ifstream i(myfile, ios::binary);
while (!i.eof())
{
i.read(buff, 2);
}
Well it should have come out of the loop but it tried to do the read
operation again...
Now... I know I should have checked the return of the read, but read
returns an ifstream...
How do I go about checking that the data was actually read and what
the heck is wrong with eof?
ifstream i(myfile, ios::binary);
while (!i.eof())
{
i.read(buff, 2);
}
Well it should have come out of the loop but it tried to do the read
operation again...
Now... I know I should have checked the return of the read, but read
returns an ifstream...
How do I go about checking that the data was actually read and what
the heck is wrong with eof?