解决’fopen’:this function or variable may be unsafe先关问题的方法

参考:https://jingyan.baidu.com/article/49711c616b8a1ffa441b7cdc.html

1、在工程文件名处右击鼠标打开快捷菜单,找到“属性”选项,进入项目属性页面

在属性页面中找到“C/C++"——”预处理器“;

2、按下图操作单击箭头指向处的按钮

在下面的编辑窗口中添加一句命令:_CRT_SECURE_NO_WARNINGS

添加完成后应用并退出

VS2015 中错误 C4996

今天用算法函数中的copy来复制字符数组时出现了这个错误 错误 C4996 ‘std::copy::_Unchecked_iterators::_Deprecate’: Call to ‘std::copy’ with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ ‘Checked Iterators’

在网上找到的解决办法 :
在工程属性—>C/C++—>命令行—>其他选项 中添加:
-D_SCL_SECURE_NO_WARNINGS
VS编译中遇到的问题

相关文章: