#include<vector> #include<algorithm> // all the std and main syntax ofcourse. vector<int> pack = {1,2,3} ; // To add at the END pack.push_back(6); // {1,2,3,6} // OR // To add at BEGGINING pack.insert(pack.begin(),6) // {6,1,2,3,}