There is the push_back function that adds the element to the end of the vector.
In C++11 there is also emplace/emplace_back that is similar to insert/push_back with the difference that you pass constructor arguments that will be used to construct the object.
You want ways other than using the vector insert function?
actually... like i want to insert the value eg 900 at the second position in the myvect . now i cannot do myvect.insert(2, 900); as it will expect vector eg ..
1 2
vector<int> mm( 1,900);
myvector.insert( mm ) ;
or inserting at the back of vector like myvector.push_back( mm) ;
so , i just wanted to know the right way other the i described above .
it may be any method ..