I have been using C# for a while now, and going back to C++ is a headache. I am trying to get some of my practices from C# with me to C++, but I am finding some resistance a
This should do what you want:
typedef typename std::vector::iterator MyIterator;
From Accelerated C++:
Whenever you have a type, such as
vector
, that depends on a template parameter, and you want to use a member of that type, such assize_type
, that is itself a type, you must precede the entire name bytypename
to let the implementation know to treat the name as a type.