VC2015发生以下报错:


1>c:\program files\microsoft visual studio 14.0\vc\include\xutility(2229) : error 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'

 

在开始头文件,增加以下语句即可:

 

1 #define _SCL_SECURE_NO_WARNINGS