Container Class::erase
Note
This topic is in the Microsoft C++ documentation as a nonfunctional example of containers used in the C++ Standard Library. For more information, see C++ Standard Library Containers.
Erases an element.
Syntax
iterator erase(
iterator _Where);
iterator erase(
iterator first,
iterator last);
Remarks
The first member function removes the element of the controlled sequence pointed to by _Where. The second member function removes the elements of the controlled sequence in the range [first
, last
). Both return an iterator that designates the first element remaining beyond any elements removed, or end if no such element exists.
The member functions throw an exception only if a copy operation throws an exception.
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for