I am having a problem reading in plain binary data from a file using ios.
I use the ios.read() funciton and it starts off OK, but about 100 bytes into the data, it sets one of the error flags. I call ios.good() and it returns a non-zero.
However, when I look at the values for the 4 possible error flags: ios::failbit, ios::badbit, ios::eofbit, and ios::goodbit, they are 0,1,2, and 4, but the ios.rdstate() function returns a 3??? Does anyone know what might be happening here??
The code was originally written for UNIX and seemed to work fine there, but now I am porting to PC using MSVC++ compiler and it won't read in all the data.