template <class ForIter, class T>    bool binary_search(ForIter start, ForIter end, const T &val); template <class ForIter, class T, class Comp>     bool binary_search(ForIter start, ForIter end, const T &val,                         Comp cmpfn);

The binary_search( ) algorithm performs a binary search on an ordered sequence beginning at start and ending with end for the value specified by val. It returns true if the val is found and false otherwise. The first version compares the elements in the specified sequence for equality. The second version allows you to specify your own comparison function.

C(s)C++ Programmer's Reference
C Programming on the IBM PC (C Programmers Reference Guide Series)
ISBN: 0673462897
EAN: 2147483647
Year: 2002
Pages: 539 © 2008-2017.
If you may any questions please contact us: