【VS / C++】#pragma warning(disable:4996) 无法消除 C4996 std::copy::_Unchecked_iterators::_Deprecate 的解决方法
SeverityCodeDescriptionProjectFileLineSuppression StateErrorC4996'std::copy::_Unchecked_iterators::_Deprecate': Call to 'std::copy' with parameters that may be unsafe - this call relies on the caller
·
Severity Code Description Project File Line Suppression State
Error 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' ****** d:\program files (x86)\microsoft visual studio 14.0\vc\include\xutility 2372
方法:在 Project → ***(项目名) Properties 中,依次打开 Configuration Properties → C/C++ → Preprocessor,在 Preprocessor Definition 中,增加:
_SCL_SECURE_NO_WARNINGS
然后确定即可。
更多推荐
所有评论(0)