Yeah, that's pretty weird.
I can't think of anything to explain why your first case would work.
The code is pretty dubious though. It mixes fgets(), fgetc() and fread() all on the same file. ...
Type: Posts; User: Salem
Yeah, that's pretty weird.
I can't think of anything to explain why your first case would work.
The code is pretty dubious though. It mixes fgets(), fgetc() and fread() all on the same file. ...
I thought this was the usual Unix ported to windows problem.
Are you saying that just creating a library without changing OS/Compiler was the cause of the breakage?
On windows, you will need to make sure that all the fopen calls for binary files are "rb" and "wb" as appropriate.
If you examine your files using a hex editor, you should see that the code breaks...