Home > Back-end > C how to open, read and write files
C how to open, read and write files
Time:12-24
Like this code, has been failed to open the file, I remember the fopen w is to create a new file, and can conveniently to speak about how to read and write files, thank you
CodePudding user response:
Put the scanf fopen and judgment after fp, the scanf also has a problem, to this:
the scanf (" % s ", c);
Give it a try,
Failed to open the file may be related to the scanf, first reverse position, the test, and then change the scanf test,