Home > Back-end >  Questions about the fopen function has no return value
Questions about the fopen function has no return value

Time:10-02

 


I use the official tutorials, still returns null Pointers, have a great god know what's going on? Vc + + under several versions,

CodePudding user response:

Buf array has the assignment

CodePudding user response:

3




















E: \ \ 1. TXT










CodePudding user response:

refer to the second floor truth is right or wrong response:
3




















E: \ \ 1. TXT

The first is not to add the diagonal the return value is NULL, but the second one is correct, why not return a value?

CodePudding user response:

Fopen parameters with the 'r' to read the way open, then your file must exist, see the buf value is literally input of
In addition fopen success open file corresponding to the use fclose

CodePudding user response:

1, e: \ aaaa. TXT said is wrong name string, because in c \ means escape characters such as \ n for the return,,,
2, to determine whether the file is there, and there are no other applications,

CodePudding user response:

reference 4 floor zgl7903 response:
fopen parameters with the 'r' to read the way open, then your file must exist, see the buf value is literally input of
Another fopen successful open file corresponding to the use fclose
version version of the adult, what do you mean if is to use R file must be inside the hard disk? In the memory can't?
  • Related