得到某个位置的迭代器

得到某个位置的迭代器

参考:C++ vector如何返回某一位置的迭代器?

vector<int>::iterator it;
it = a.begin()+4;
it = advance(a.begin(), 4);
it = next(a.begin(), 4);