hi everyone,

well, I solved problem myself but still I would appreciate if you have any other method of dealing the problem which is more efficient.

Also, I have a question. Is it better to do all the insertion operation using a list and then copy the values in a vector for later use in the program.

here is the solution code.

typedef vector<int> INT;

int main()

{

INT a;

a.push_back(0);

a.push_back(1);

a.push_back(2);

a.push_back(3);

a.push_back(4);

int index=1;

INT::iterator i,where;

where=a.begin()+index;

a.insert(where,10);

where++;

a.insert(where,11);

for (i=a.begin();i!=a.end();i++)

{

cout<<(*i)<<endl;

}

return 1;

}

well, I solved problem myself but still I would appreciate if you have any other method of dealing the problem which is more efficient.

Also, I have a question. Is it better to do all the insertion operation using a list and then copy the values in a vector for later use in the program.

here is the solution code.

typedef vector<int> INT;

int main()

{

INT a;

a.push_back(0);

a.push_back(1);

a.push_back(2);

a.push_back(3);

a.push_back(4);

int index=1;

INT::iterator i,where;

where=a.begin()+index;

a.insert(where,10);

where++;

a.insert(where,11);

for (i=a.begin();i!=a.end();i+

{

cout<<(*i)<<endl;

}

return 1;

}