在Visual Studio 2005 C++编译器上,当我的代码使用fopen和此类调用时,我收到以下警告.
1>foo.cpp(5) : warning C4996: 'fopen' was declared deprecated
1> c:\program files\microsoft visual studio 8\vc\include\stdio.h(234) : see declaration of 'fopen'
1> Message: 'This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
Run Code Online (Sandbox Code Playgroud)
我该如何防止这种情况?
我收到了以下警告
warning C4996: 'std::_Uninitialized_copy0': Function call 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:\program files\microsoft visual studio 10.0\vc\include\memory 348
我似乎无法找到任何有助于打击此警告的信息.通过查看输出,这个警告似乎与Boost.Signals2和auto_buffer有关.
这样可以安全忽略,还是可以以某种方式将其删除?