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.
template <typename V, typename E>
void Graph<V, E>::InsertEdge(V from, V to, E edge)
for(iter = m_Vertices.begin(); iter != m_Vertices.end(); ++iter)
any help is appreciated! thanks
Last edited on
my error is line 6... For some reason I'm having trouble getting the iterator to accept my Data type as valid...
the binary scope res operator says "No members available on line 4". so I just typed it in anyway and it doesn't work. I'll try your way kbw..
Also I fixed an error in my original post. I had the data type as Vector when it should've said Vertex, my own class.