Re: odd behaviour of fread
Your code is a mess.
But, if it says 245 then it is jumpin that far. Are you sure the struct in the first read isn't 245 bytes large?? 245 is a weird one to end up as well especially if you are using MSVC since padding keeps it all to divisible by DWORD.
Re: odd behaviour of fread
The fread return value is fine:
Quote:
fread returns the number of full items actually read,
Does fgetpos return 0?
Re: odd behaviour of fread
i ditched fread some time ago, and switched to ifstream, works better now, thanks for answering anyway :wave: