Question: Develop a function that satisfies following requirements: It takes in two parameters: std::vector & vi and int target. It returns a std::vector int>that contains all

 Develop a function that satisfies following requirements: It takes in two

Develop a function that satisfies following requirements: It takes in two parameters: std::vector& vi and int target. It returns a std::vector int>that contains all numbers from vi that are less than target. It removes all numbers in vi that are less than target. Test the function in main. Note: please consider using vector's member functions for this task, such as push_back() and erase (). If you are new to erase (), please do some study about it as it changes some of vector's iterators. Keywords: Remove elements of a vector inside the loop

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!