我有一个函数,它搜索一个STL容器,然后返回迭代器,当它发现位置,但我收到一些有趣的错误信息,可以告诉我我做错了什么?返回一个迭代器
功能:
std::vector<CClass>::iterator CClass::SearchFunction(const std::string& strField)
{
...
return it;
...
}
错误:
error C2664: 'std::_Vector_iterator<_Ty,_Alloc>::_Vector_iterator(const std::_Vector_iterator<_Ty,_Alloc> &)' : cannot convert parameter 1 from 'std::_Vector_const_iterator<_Ty,_Alloc> *__w64 ' to 'const std::_Vector_iterator<_Ty,_Alloc> &'
谢谢!我知道这很愚蠢。 :) – Konrad 2008-11-24 12:29:34