thể trùng lặp:
Why does calling boost:split() give so many warnings?Cảnh báo với boost :: chia khi biên dịch
Vì vậy, đây là mã của tôi:
Account ParseString(string data){
vector <string> fields;
boost::split(fields, data, boost::is_any_of("a,;"));
int limit = fields.size();
for(int i = 0; i < limit; i++)
cout << fields[i] << endl;
}
và đây là những gì tôi nhận được khi đang cố gắng biên dịch:
d:\program files (x86)\visualstudio\vc\include\xutility(2227): warning 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'
Câu hỏi của tôi là, tôi đã làm gì sai? Tôi có thể làm gì để ngăn chặn những thông báo lỗi đó?
Bạn không thể tắt cảnh báo đó. –
[Cảnh báo này là lỗi trong MSVC2012] (http://stackoverflow.com/questions/12618087/vs-11-d-scl-secure-no-warnings-in-vs-10-treated-as-errors-now). – rubenvb