Question: Please use this template. In this exercise you are to use a vector to store integers entered by the user. Once you have filled the
Please use this template.
In this exercise you are to use a vector to store integers entered by the user. Once you have filled the vector, ask the user for a value to search for. If found, remove the value from the vector, keeping all other values in the same relative order, and then display the remaining values.
#include
using namespace std;
//Fills vector with user input until user enters 0 (does not include 0 within vector). void fillVector(vector
//Searches for val within vector. //If val found, returns index of first instance of val. //If val not found, returns UINT_MAX (constant provided by the climits library). unsigned search(const vector
//Removes from the vector the value at index, keeping all other values in the same relative order. void remove(vector
//Displays all values within vector, each value separated by a space. void display(const vector
int main() { vector
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
