#include <algorithm> iterator max_element( iterator start, iterator end ); iterator max_element( iterator start, iterator end, BinPred p );
The max_element() function returns an iterator to the largest element in the range [start,end).
If the binary predicate p is given, then it will be used instead of the < operator to determine the largest element.