fread reads the byte file is missing

fread(xxxxx,"r");

Case of reading a binary file in read manner, found the missing bytes

Change

fread(xxxxx,"rb");

The way to read binary

the reason:

fread reading of 0x0D 0x0A 0x0A will become as text

[C language] fwrite to write as when 0X0A, automatically add the solution 0X0D

Carriage return and line feed 0x0D 0x0A issues

Guess you like

Origin www.cnblogs.com/Jacket-K/p/11512517.html