1. 程式人生 > >string中C4996錯誤解決方法

string中C4996錯誤解決方法

error C4996: 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>::copy':

 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'

解決方法:

在原始檔中新增:

#define _SCL_SECURE_NO_WARNINGS