Fread Troubles
A project I'm working on in C includes reading in blocks of data from a binary file into a buffer, and then printing the information to stdout. I obtain the data from the binary file using fread.
This works for most of the cases, but for some reason when the block of bytes to be read in is supposed to represent integers fread seems to fail. Using my debugger I checked the values in the buffer and they never even seem to get changed. I already checked the return value of fread and I checked feof() and ferror() and nothing seems out of the ordinary. What could cause something like this?
Posted Mar 24, 2012, 9:09 PM UTC
214