min_element [C++ Reference]
Keywords: stl,algorithm,min_element
Date: 2009-10-09T02:17:19-0700

[[min_element]]
C++ Reference
Translations of this page?:

- en
- br-pt
- cn
- cz
- de
- es
- fr
- it
- jp
- nl
- pl
- ro
- ru
- sk
- tr
- tw

## min_element

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

Edit this page • Old revisions
• • • Login • Index • Recent changes • RSS • cc •