Table of Contents
Previous Section Next Section

mismatch

template <class InIter1, class InIter2>    pair<InIter1, InIter2> mismatch(InIter1 start1, InIter1 end1,
                                    InIter2 start2);
template <class InIter1, class InIter2, class BinPred>
    pair<InIter1, InIter2> mismatch(InIter1 start1, InIter1 end1,
                                    InIter2 start2, BinPred pfn);

The mismatch( ) algorithm finds the first mismatch between the elements
in two sequences. Iterators to the two elements are returned. If no mismatch is found, then the iterators end1 and start2 + (end1 – start1) are returned.

The second form allows you to specify a binary predicate that determines when one element is equal to another.

The pair template class contains two data members called first and second, which hold the pair of values.


Table of Contents
Previous Section Next Section