"Eric Lance" <eric.lance@xxxxxxxxx> writes: > I'm trying to figure out if this is a bug or "feature". In a generic > function, I want to declare an iterator over a map whose values are > generic vectors. However, I get a syntax error whenever I try to > declare this particular kind of iterator. The code snippet below > should illustrate what I mean better: > > template<typename T> > void func() > { > map< int, vector<T> > m; //we want an iterator over m. > map< int, vector<T> >::iterator i; //this doesn't compile > map< int, vector<int> >::iterator k; //but this does > } This is not a gcc question. In standard C++ you need to say typename map< int, vector<T> >::iterator i; Ian