How to disable Warnings of Visual Studio 2012?

前端 未结 2 2036
北荒
北荒 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:58

    Yes, you can simply right click on "YourFile.cpp" file and choose "Properties"; Click on "Configuration Properties" and in the front part choose "No" for "SDL checks". It will consider these errors as warnings in the next compilation.

    However you can prevent this property while creating a new project by unticking the "Security Development Lifecycle (SDL) checks" option.

    The same for VS2013!

提交回复
热议问题