failbit is being set and I can't figure out why
- by felipedrl
I'm writing a MIDI file loader. Everything is going fine until at some track I get a failbit exception while trying to read from file. I can't figure out why, I've checked the file size and it's ok too.
Upon checking "errno" and it returns "0".
Any ideas?
Thanks.
The snippet follows:
file.read(reinterpret_cast<char*>(&mHeader.id),…