gpt4 book ai didi

c++ - 编译时使用 boost::split 警告

转载 作者:可可西里 更新时间:2023-11-01 17:35:32 25 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
Why does calling boost:split() give so many warnings?

所以,这是我的代码:

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;
}

这是我在尝试编译时得到的结果:

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'

我的问题是,我做错了什么?我该怎么做才能避免出现这些错误消息?

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com