网站服务器数据迁移,软文推广页面,wordpress资讯站模板,免费行情网站推荐在VS2015中使用boost库函数buffer时遇到问题#xff0c;其他函数定义均能执行#xff0c;当加上bg::buffer(参数输入正确);语句后就报如下错误#xff1a; 错误 C4996 std::_Copy_impl: Function call with parameters that may be unsafe - this call relies… 在VS2015中使用boost库函数buffer时遇到问题其他函数定义均能执行当加上bg::buffer(参数输入正确);语句后就报如下错误 错误 C4996 std::_Copy_impl: 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 VS15_boost_test d:\program files (x86)\microsoft vs\microsoft visual studio 14.0\vc\include\xutility 2230 头文件等内容均已检查无误就是无法执行。 解决办法 右击执行该部分的源文件即main.cpp选择属性
属性- c\c - 预处理器 - 预处理器定义 里添加_SCL_SECURE_NO_WARNINGS
注意项目执行平台和当前cpp属性中平台保持一致
应用/确定后即可编译成功。