logo CodeStepByStep logo

removeAll

Language/Type: C++ vector collections STL
Related Links:

Write a function named removeAll that accepts as a parameter a reference to a vector of strings along with an element value string, and modifies the vector to remove all occurrences of that string. For example, if the vector v contains {"a", "b", "c", "b", "b", "a", "b"}, the call of removeAll(v, "b"); should modify it to store {"a", "c", "a"}.

Function: Write a C++ function as described, not a complete program.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.