Weird Syntax error with iterator

list<Vertex<K, D>> map;
list<Vertex<K, D> >::iterator m_iterator; //I get the error here

error C2146: syntax error : missing ';' before identifier 'm_iterator'

I have a class named graph thats double templated with K and D and another class that's called vertex that is also double templated with K and D and when I try to make an iterator for the list of map, I get this error. Any help? =)
You need a space before the second > of your definition of map.

Also, map is the name of another std container so you should probably call it something else.
Don't you need to use typename here?
typename list<Vertex<K, D>>::iterator m_iterator;
Topic archived. No new replies allowed.