原型:errno_t  fopen_s( FILE** pFile, const char *filename, const char *mode );

 

  例子:

      char *filePath="D:\\aaa.txt";

      FILE *file;

      errno_t err;  【 errno_t 数据类型,打开 =0,打不开 非0 】

      err = fopen_s(&file, filePath, "wa");

 

  打开方式(mode):

    r , w , a

    r+ , w+ , a+

    rb+ , wb+ , ab + 

    rw+

 

 

相关文章:

  • 2021-06-20
  • 2021-06-27
  • 2021-07-19
猜你喜欢
  • 2021-08-31
  • 2021-07-29
  • 2021-09-26
  • 2021-09-04
相关资源
相似解决方案