I can't seem to make the STL iterator class work how I need it to.
I am implementing a multi list graph and I need to iterate through my STL list of Vertex pointer objects. I keep getting the error:
Error 1 error C2679: binary '=' : no operator found which takes a right-hand operand of type 'std::_List_iterator<_Mylist>' (or there is no acceptable conversion)
and the same for != for my terminating condition.
1 2 3 4 5 6 7 8 9 10 11
template <typename V, typename E>
void Graph<V, E>::InsertEdge(V from, V to, E edge)
{
list<Vertex<V>*>::iterator iter;
for(iter = m_Vertices.begin(); iter != m_Vertices.end(); ++iter)
{
}
}
#endif