Is there a standard function that returns the position(not value) of the max element of an array of values?
For example:
Suppose I have an array like this:>
Or, written in one line:
std::cout << std::distance(sampleArray.begin(),std::max_element(sampleArray.begin(), sampleArray.end()));