|
|
我定?一??CPoint的list,我?在要判?辔夷壳耙?尤氲狞c,是否重?,我想用find,可是?s出?一些??
我想??一下是否要?承CPoint去改operator==?
std::list<CPoint> m_point_list;
void Func1(CPoint point_cell)
{
std::list <CPoint>::iterator result;
result==std::find(m_point_list.begin(),m_point_list.end(),&point_cell);
}
1>MapGriderView_Draw.cpp
1>d:\program files\microsoft visual studio 8\vc\include\algorithm(40) : error C2678: binary '==' : no operator found which takes a left-hand operand of type 'CPoint' (or there is no acceptable conversion)
1> could be 'built-in C++ operator==(CPoint *__w64 , CPoint *__w64 )'
1> d:\program files\microsoft sdks\windows\v6.0\include\guiddef.h(192): or 'int operator ==(const GUID &,const GUID &)' [found using argument-dependent lookup]
1> d:\program files\microsoft visual studio 8\vc\atlmfc\include\atltypes.h(91): or 'BOOL CPoint: perator ==(POINT) throw() const'
1> while trying to match the argument list '(CPoint, CPoint *__w64 const )'
1> d:\program files\microsoft visual studio 8\vc\include\algorithm(74) : see reference to function template instantiation '_InIt std::_Find<std::list<_Ty>::_Iterator<_Secure_validation>,CPoint>(_InIt,_InIt,CPoint &)' being compiled
1> with
1> [
1> _InIt=std::list<CPoint>::_Iterator<false>,
1> _Ty=CPoint,
1> _Secure_validation=false
1> ]
1> d:\svn\horse racing game\src\mapgrider\mapgriderview_draw.cpp(136) : see reference to function template instantiation '_InIt std::find<std::list<_Ty>::_Iterator<_Secure_validation>,CPoint*__w64 >(_InIt,_InIt,CPoint &)' being compiled
1> with
1> [
1> _InIt=std::list<CPoint>::_Iterator<true>,
1> _Ty=CPoint,
1> _Secure_validation=true
1> ]
1>Build log was saved at "file://d:\SVN\horse racing game\src\MapGrider\Debug\BuildLog.htm"
1>MapGrider - 1 error(s), 0 warning(s) |
|