C++ Standard Library find() Sample

Description

find() does a simple linear search through an unsorted sequence of elements. It returns an iterator to the first matching element, or one past the sequence end if a matching element is not found.

Declaration

	template <class In, class T>
	    In find(In, In, const T&);

Concept

The example sets up a vector of integers, and then searches it to find the iterator offset of a matching element. In this example the offset that is displayed is 3.

Special Notes:

find_if() can be used to specify a predicate for searching.

Supported
Supported
Supported