Sequence Accumulation
Write a function
T accum(vector <T> v)
that forms and returns the “sum” of all items in the vector v passed to it. For example, if T is a numeric type such as int or double, the numeric sum will be returned, and if T represents the STL string type, then the result of concatenation is returned.
Test your function with a driver program that asks the user to enter 3 integers, uses accum to compute the sum, and prints out the sum. The program than asks the user to enter 3 strings, uses accum to concatenate the strings, and prints the result.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.