int r, i, arrayMinimumIndex(auto a)
{
for (int c : a)
c > a[r] ?: r = i, ++i;
return r;
}
I'm trying to run this code but it shows:
[Error] a function-definition is not allowed here before '{' token
[Error] 'arrayMinimumIndex' was not declared in this scope
Can anyone explain why does it fail and fix it ? Thanks in advance