Q:

In the program on page 349 that erased a range of elements, what happens if elem1 and elem2 are equal? What if elem2 or both elem1 and elem2 are the off-the-end iterator

0

In the program on page 349 that erased a range of elements, what happens if elem1 and elem2 are equal? What if elem2 or both elem1 and elem2 are the off-the-end iterator?

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

If `elem1` and `elem2` are equal, then no element will be removed from the container.

If `elem2` or both `elem1` and `elem2` are the off-the-end iterator, then all elements from `elem1` to the last element in the container will be removed.

 

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now