vector<int> v1{4, 2, 1, 6, 3, -4};
assert(fct<int>(v1) == 6);
vector<int> v2;
try {
fct<int>(v2);
assert(false);
}
catch (exception& exc) {
assert(true);
}
vector<double> v3{2, 10.5, 6.33, -100, 9, 1.212};
assert(fct<double>(v3) == 10.5);
vector<string> v4{"y", "q", "a", "m"};
assert(fct<string>(v4) == "y");
I know that the fct function should return the maximum of the vector but I can't wrap my head on how the header of the function should look like.