How do I erase an element from std::vector<> by index?
Actually, the erase function works for two profiles:. Removing a single element. iterator erase (iterator position); Removing a range of elements. iterator erase (iterator first, iterator last);