Question: Write a C++ program that uses the following two functions with comments T min (vector v) T max (vector v) that will accept a vector

Write a C++ program that uses the following two functions with comments

T min (vector v) T max (vector v) that will accept a vector v that is passed to it and return the min and max value of all items in the vector v passed to it. For example, if T is a numeric type such as an int or double ,when the min function is called, the minimum value in the vector will be returned. When the max function is called, the maximum value in the vector will be returned. Use the file minmax.txt to populate the vectors. The file will contain 5 integer values followed by five string values. Once the vectors are populated, call the min function and the max function for the integer vector. Then call the min function and the max function for the string vector. Display the results of the min and max function calls.

minmax.txt contains:

10529 5555 3 268 -7 Bonza Runescape Google Orange Amazon

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!