I have been studying stl for the last two weeks and have been dealing with alot vector<T>, deque<T>and list<T>. All those times I used the push_back(), push_front(), insert(). Currently, I have been introduced to "Insert Iterators" , which are as follows:
back_insert_iteratorwhich is similar push_back()and requires that the container has a function push_back()to workfront_insert_iteratorwhich is similar push_front()and requires that the container haspush_front()insert_iteratorsimilar insert()and blah blah blah
So, I know how to implement all this. My question is pretty simple, what's the difference? Why use Insert Iterators ?
source
share