Home > Back-end >  A same. C file, I am in the Linux this translated into. A normal files, in Windows compiled into. Ex
A same. C file, I am in the Linux this translated into. A normal files, in Windows compiled into. Ex

Time:02-24

CodePudding user response:

For Windows on the left side, the back of the countless according to written documents, ubuntu is on the right and normal program execution

CodePudding user response:

Well, received, really very strange,

CodePudding user response:

Debugging, look to see what a specific, inconsistent results,

CodePudding user response:

Is process data file format problems? Clearly on the left side OF the Windows client have a WARNING: the END OF the DATA IN the FILE,

CodePudding user response:

Windows default text mode, open the file Linux open files default binary mode,

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
  • Related