Question Define the template function template <typename T1, typename T2> int count_exact(T1 a[], T2 size, T1 find) that returns the number of times find occurs in 623262. Ex: count_exact(arr, 6, 2) would return 3 because 2 appears three times in arr. Test your function in your main() using an array of ints, and an array of strings. Please comment explaining which operations the types T1 and T2 need to support for your code to work.

NKE8SM The Asker · Computer Science

Define the template function

template <typename T1, typename T2>

int count_exact(T1 a[], T2 size, T1 find)

that returns the number of times find occurs in 623262. Ex: count_exact(arr, 6, 2) would return 3 because 2 appears three times in arr. Test your function in your main() using an array of ints, and an array of strings. Please comment explaining which operations the types T1 and T2 need to support for your code to work.

More