I have something like this :
vector<int> tmp={1,4,6,10,6};
vector<int>::iterator it1=tmp.begin()+1;
vector<int>::iterator it2=tmp.begin()+3;
// printing before insertion
cout<<*it1<<" "<<*it2<<endl;
tmp.insert(tmp.begin()+2, 200 );
//printing after insertion
cout<<*it1<<" "<<*it2<<endl;
I get some output like this :
4 10
0 10
Can someone help me understanding what wrong is happening here ?