STL: mismatch

mismatch

Compares two ranges element by element either for equality or equivalent in a sense specified by a binary predicate and locates the first position where a difference occurs.

template<class InputIterator1, class InputIterator2>
   pair<InputIterator1, InputIterator2> mismatch(
      InputIterator1 _First1, 
      InputIterator1 _Last1,
      InputIterator2 _First2
  );
template<class InputIterator1, class InputIterator2, class BinaryPredicate>
   pair<InputIterator1, InputIterator2> mismatch(
      InputIterator1 _First1, 
      InputIterator1 _Last1,
      InputIterator2 _First2
      BinaryPredicate _Comp
   );

注,第二个序列的长度一定要大于等于第一个序列长度。

posted @ 2013-03-07 13:15  freewater  阅读(267)  评论(0编辑  收藏  举报