delete element from vector with its reference cpp code example
Example 1: vector erase specific element
vector.erase( vector.begin() + 3 ); // Deleting the fourth element
Example 2: c++ remove element from vector
vector.erase(position) // remove certain position
// or
vector.erase(left,right) // remove positions within range