Witam, mam nastepujacy problem:
napisalem sobie mala klase CostTile ze zdefiniowanym operatorem
int operator==(CostTile& a, CostTile& b)
, potem tworze obiekt tej klasy
::CostTile neighboor;
i jakos go inicjalizuje.
Nastepnie jest:
std::find(closed.begin(), closed.end(),neighboor);
i na tej linijce mi sie wywala.
MSVC.NET daje komunikat bledu:
binary '==' : no operator found which takes a left-hand operand of type 'std::allocator<_Ty>::value_type' (or there is no acceptable conversion)
with
[
_Ty=CostTile
]
f:\Temp\modules\engine\ctilemap.cpp(141) : see reference to function template instantiation '_InIt std::find<_Ty>::iterator,CostTile>(_InIt,_InIt,const _Ty &)' being compiled
with
[
_InIt=std::list::iterator,
_Ty=CostTile
]
Nie bardzo rozumiem ten blad. Prosze o pomoc. </quote></cpp>