Home > Software engineering >  Binary file is written to the problem
Binary file is written to the problem

Time:03-13

Function to achieve change figure: he had written a. The map file, I use notepad + + plug-in Hex - Editor into binary bytes, then copy, with the following code to write, why actually written. The map file size and I write. The map is not the same as the file size?

 

CodePudding user response:

Don't put the
Fopen ("... ", "... "); Fscanf fprintf, the fgets, fgetc fputc, fclose//read the replaced \ r \ n \ n, write to replace the \ n \ r \ n. EOF is read \ x1a set; When the content of the read and write characters see
And
Fopen ("... ", "... "); Fseek, ftell, fread and fwrite, fscanf, fprintf, the fgets, fgetc, fputc, fclose//do not make the above replacement, encounter \ x1a continued to read; When the content of the read and write bytes see
Confused by the

CodePudding user response:

Is the FILE * p1=fopen (newFile, "wb");
  • Related