How to disable Warnings of Visual Studio 2012?

前端 未结 2 2020
北荒
北荒 2021-01-15 05:53

I have this error:

error C4996: \'fopen\': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_S

2条回答
  •  再見小時候
    2021-01-15 05:59

    You must define _CRT_SECURE_NO_WARNINGS in the preprocessor settings of your project, or #define _CRT_SECURE_NO_WARNINGS at the beginning of your file where you use fopen(). Or just use fopen_s() instead.

提交回复
热议问题