I created some object with an overloaded == operator in it.
class Corridor { public: Corridor(int iStart, int iEnd); ~Corridor();
In this case, if I create the Corridors vector somewhere:
vector<Corridor> m_vCorridors;
proggram works fine and I can use the search algorithm:
auto itCorridor = find(m_vCorridors.begin(), m_vCorridors.end(), someID);
BUT in case I create a vector of pointers:
vector<Corridor*> m_vCorridors;
I get errors: Error 1 error C2446: '==': there is no conversion from 'const int' to 'Corridor *' c: \ program files (x86) \ microsoft visual studio 10.0 \ vc \ include \ algorithm 41 Error 2 errors C2040 : '==': "Corridor *" differs in indirection from "const int" c: \ program files (x86) \ microsoft visual studio 10.0 \ vc \ include \ algorithm 41
Tried to overload operator == in different ways, but in this case it does not work. Does anyone know what I should do to solve the problem?
source share