Why can't I use fopen?

前端 未结 6 1310
北荒
北荒 2020-12-08 15:06

In the mold of a previous question I asked about the so-called safe library deprecations, I find myself similarly bemused as to why fopen() should be deprecated

6条回答
  •  独厮守ぢ
    2020-12-08 15:50

    Thread safety. fopen() uses a global variable, errno, while the fopen_s() replacement returns an errno_t and takes a FILE** argument to store the file pointer to.

提交回复
热议问题