To delete an element use the following way:
// declaring and assigning array1 std:vector<int> array1 {0,2,3,4}; // erasing the value in the array array1.erase(array1.begin()+n); For a more broad overview you can visit: http://www.cplusplus.com/reference/vector/vector/erase/