I'm trying to read a 3D mesh file, but there seems to be something wrong with my file wrapper class, which is understandable since I never tested reading a binary file before... -_-
After the line with the read() function, good() returns false. If I call the good() function before read() it returns true, so I'm sure that's where things go wrong.
aSizeToRead has the correct value, and even if I set it to 1 the same thing happens.
Am I using the read() function incorrectly?
Just to clarify, tempFile isn't a filestream, it's an object of the file wrapper class I'm using.
I did however check in the ReadData function that the filestream it wraps is open before reading from it, and it is.
Really? That's a lot of code to dump here for something that feels so isolated in that one function.
I might do that tomorrow if my teacher can't give me a simple solution.