Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Vector Container: 1a. Write a template function(in header file) to search a valu

ID: 3683710 • Letter: V

Question

Vector Container:

1a. Write a template function(in header file) to search a value stored in a vector and return the position(index) of the item if found; otherwise, return a negative value. Then write a driver to test it. The driver should at least test two different type of vector. Use vector index to do it.

1b. Write a template function(in header file) to search a value stored in a vector and return the position(index) of the item if found; otherwise, return a negative value. Then write a driver to test it. The driver should at least test two different type of vector. Use iterator to do it.

Explanation / Answer

1a)

1b.