C++ Erase Function Parameters
The erase function in C++ is a function used to delete elements in a container, with the following parameters.
- position of the iterator
- The first iterator
- the last element in the iterator
- n of type size_type
The position and n parameters are mutually exclusive, meaning you can only choose one. The parameters first and last can be used to define a range of elements to delete, or you can specify just the first parameter to delete a single element.