#include <iostream> using namespace std; template <typename T> T max5(const T(&)[5]); int main() { double arr1[] { 2.5, 32.321, -442.4, 41.321, 34.005 }; int arr2[]{ 3, 45, 0, 412, -32}; cout << max5(arr1); cout << max5(arr2); cin.get(); return 0; } template <typename T> T max5(const T (&arr)[5]) { T thebiggest = 0; for (int i = 0; i < 5; i++) arr[i] > thebiggest ? thebiggest = arr[i] : continue; return thebiggest; } Here is what he writes: error C2760: syntax error: expected the token "<No data>, not" <No data> "note: A diagnostic message originated in the function created by the compiler" T max5 (const T (&) [5]) "function must accept an array of 5 elements of the base type and return the largest one.
continueinside the statement?:? - AnT