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:>
std::max_element takes two iterators delimiting a sequence and returns an iterator pointing to the maximal element in that sequence. You can additionally pass a predicate to the function that defines the ordering of elements.