In each container, iterator of container is implemented by itself. There is
no iterator class inheritance hierarchical structure. I means that
in vector, there is vectIter: Iterator (vectIter inheriate from base
iterator class) , then you define ++ operator in class vectIter class.
It’s totally wrong. In fact, In vector, Maybe iterator is defined by:
template<type T> vector{ .... typedef T* iterator; }; vector<int>::iterator ip; //use it outside. // ++ and -- is done by pointer automatically.
and All the member function of vector know the iterator very well, inside, it
will use T* directly,
push_back(T x){ *end++ = x; } // you can see there is no iterator // when you implement container implementation.