D
desktop
Why does insert only work when specifying an iterator plus the object to
be inserted:
std::vector<int> t;
std::vector<int>::iterator it;
it = t.begin();
t.insert(it,33);
If I use push_back instead I don't need to supply the iterator. But what
are the reason the insert only works with an iterator?
be inserted:
std::vector<int> t;
std::vector<int>::iterator it;
it = t.begin();
t.insert(it,33);
If I use push_back instead I don't need to supply the iterator. But what
are the reason the insert only works with an iterator?