Is there a way to use fopen_s() with GCC or at least create a #define about it?

前端 未结 6 918
遇见更好的自我
遇见更好的自我 2020-12-05 10:54

MSVC compiler says that fopen() is deprecated, and recommends the use of fopen_s().

Is there any way to use fopen_s() and stil

6条回答
  •  不知归路
    2020-12-05 11:34

    if you are using C11, fopen_s is a standard library:

    http://en.cppreference.com/w/c/io/fopen

    in gcc you need to use --std=C11 parameter.

提交回复
热议问题