C++ Standard Library mismatch() Sample

Description

mismatch() compares two element sequences, and returns a pair of iterators to the first elements that are mismatched. The sequences are assumed to be the same length, and a user-defined comparison function may be supplied to compare individual elements.

Declaration

	template <class In, class In2>
	    pair<In, In2> mismatch(In, In, In2);
	template <class In, class In2, class BinPred>
	    pair<In, In2> mismatch(In, In, In2, BinPred);

Concept

The sample compares two sequences of integers, and displays the element values (4 and 5) at the point of first mismatch.

Supported
Supported
Supported