C++ Standard Library equal() Sample

Description

equal() compares two sequences to determine whether all elements are equal. The sequences are assumed to be the same length, and a user-defined predicate can be specified that determines whether two elements are equal.

Declaration

	template <class In, class In2>
	    bool equal(In, In, In2);
	template <class In, class In2, class BinPred>
	    bool equal(In, In, In2, BinPred);

Concept

The sample program defines two vectors, one of integers and the other of C-style strings. These sequences are compared, with a user-defined comparison function specified. The strings are converted to integers for the comparison.

Supported
Supported
Supported