相关疑难解决方法(0)

fopen弃用警告

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)

我该如何防止这种情况?

fopen deprecated visual-c++

66
推荐指数
5
解决办法
16万
查看次数

Visual Studio警告C4996

我收到了以下警告

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有关.

这样可以安全忽略,还是可以以某种方式将其删除?

c++ warnings

34
推荐指数
1
解决办法
3万
查看次数

标签 统计

c++ ×1

deprecated ×1

fopen ×1

visual-c++ ×1

warnings ×1