Home > Back-end > The humble small white online seek counsel
The humble small white online seek counsel
Time:09-27
Simple c + + to open the file operations: #include Int main () { The FILE * p; P=fopen_s (" F: \ \ 1. TXT ", "w");
return 0; } Always prompt the following error: (with vs2019) Const char * type of real participation of "FILE" * * type parameter is not compatible with The parameters in the function call little "Fopen_s:" function does not accept two parameters [/b]
Really don't know where is wrong, please teach a great god,
CodePudding user response:
Int main () { Errno_t err; Stream FILE * and * stream2; Err=fopen_s (& amp; Stream, "crt_fopen_s. C", "r"); If (err==0) { Printf (" The file 'crt_fopen_s. C was The opened \ n "); } The else { Printf (" The file 'crt_fopen_s. C' was not The opened \ n "); } }