OK, I get the idea of what you guys are doing to solve my problem, but for some reason it's not working with the iterator.
This compiles until I uncomment:
template<class A> E_VAL RemoveByIterator(std::vector<A> vect/*, std::vector<A>::iterator iter*/);/*********/template<class A> E_VAL CObjectList::RemoveByIterator(std::vector<A> vect/*, std::vector<A>::iterator iter*/){ //SafeDelete(*iter); //vect.erase(iter); m_numVertices -= 6; m_numPolygons -= 2; return RET_OK;}
I get the error I posted above when I uncomment the iterator. I'll repost here for convenience:
warning C4346: 'std::vector<A>::iterator' : dependent name is not a type
error C2061: syntax error : identifier 'iterator'
I get that warning+error 3 times on the header, and 1 time on the function itself.
edit: whether I have std::vector<A> or std::vector<A*> has no impact on compiler errors whatsoever.
edit again: unrelated question, how do you get that cool code box, antheus?
edit again again: just noticed that word "typename" !!!!!!!!