bool ranking_manager::split_string(std::vector<s_uint32> &vec,std::string str,const char *p)
{
s_uint32 number;
std::vector<std::string> strvec_;
if(vec.size()<=0 || str.length() == 0)
return false;
//使用boost自带进行字符串的分割
boost::split(strvec_, str, boost::is_any_of(p), boost::token_compress_on);
//类型转换string转换为int
std::vector<std::string>::iterator it = strvec_.begin();
for(it;it!= strvec_.end();++it)
{
std::stringstream stream;
stream << *it;
stream >> number;
vec.push_back(number);
}
strvec_.clear();
return true;
}
e:\soft\vs2010\vc\include\xutility(2239): 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'
2> e:\soft\vs2010\vc\include\xutility(2224) : 参见“std::_Copy_impl”的声明
2> d:\d3\project\source\tools\boost_1_51_0\boost\algorithm\string\detail\classification.hpp(102): 参见对正在编译的函数 模板 实例化“_OutIt std::copy<const char*,char*>(_InIt,_InIt,_OutIt)”的引用
2> with
2> [
2> _OutIt=char *,
2> _InIt=const char *
2> ]
2> d:\d3\project\source\tools\boost_1_51_0\boost\algorithm\string\classification.hpp(206): 参见对正在编译的函数 模板 实例化“boost::algorithm::detail::is_any_ofF<CharT>::is_any_ofF<boost::iterator_range<IteratorT>>(const RangeT &)”的引用
2> with
2> [
2> CharT=char,
2> IteratorT=const char *,
2> RangeT=boost::iterator_range<const char *>
2> ]
2> d:\d3\project\source\server\game\src\logic\ranking\ranking_manager.cpp(233): 参见对正在编译的函数 模板 实例化“boost::algorithm::detail::is_any_ofF<CharT> boost::algorithm::is_any_of<const char*>(const RangeT &)”的引用
2> with
2> [
2> CharT=char,
2> RangeT=const char *
2> ]e:\soft\vs2010\vc\include\xutility(2239): 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'
2> e:\soft\vs2010\vc\include\xutility(2224) : 参见“std::_Copy_impl”的声明
2> d:\d3\project\source\tools\boost_1_51_0\boost\algorithm\string\detail\classification.hpp(102): 参见对正在编译的函数 模板 实例化“_OutIt std::copy<const char*,char*>(_InIt,_InIt,_OutIt)”的引用
2> with
2> [
2> _OutIt=char *,
2> _InIt=const char *
2> ]
2> d:\d3\project\source\tools\boost_1_51_0\boost\algorithm\string\classification.hpp(206): 参见对正在编译的函数 模板 实例化“boost::algorithm::detail::is_any_ofF<CharT>::is_any_ofF<boost::iterator_range<IteratorT>>(const RangeT &)”的引用
2> with
2> [
2> CharT=char,
2> IteratorT=const char *,
2> RangeT=boost::iterator_range<const char *>
2> ]
2> d:\d3\project\source\server\game\src\logic\ranking\ranking_manager.cpp(233): 参见对正在编译的函数 模板 实例化“boost::algorithm::detail::is_any_ofF<CharT> boost::algorithm::is_any_of<const char*>(const RangeT &)”的引用
2> with
2> [
2> CharT=char,
2> RangeT=const char *
2> ]
这个要怎么改,没看明白?