Syntax:
#include <algorithm> forward_iterator min_element( forward_iterator start, forward_iterator end ); forward_iterator min_element( forward_iterator start, forward_iterator end, BinPred p );
The min_element
function returns an iterator to the smallest 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 smallest element.
Related Topics: max, max_element, min