图  0.1
数据结构_第13章
Find Namespace Reference

Functions

template<class InputIterator , class T >
InputIterator find (InputIterator first, InputIterator last, const T &val)
 顺序查找一个顺序单链表 More...
 

Function Documentation

◆ find()

template<class InputIterator , class T >
InputIterator Find::find ( InputIterator  first,
InputIterator  last,
const T &  val 
)

顺序查找一个顺序单链表

Returns an iterator to the first element in the range [first,last) that compares equal to val. If no such element is found, the function returns last.
The function uses operator== to compare the individual elements to val.

Template Parameters
InputIterator
T
Parameters
firstInput iterators to the initial and final positions in a sequence.
The range searched is [first,last), which contains all the elements between first and last, including the element pointed by first but not the element pointed by last.
lastInput iterators to the initial and final positions in a sequence.
The range searched is [first,last), which contains all the elements between first and last, including the element pointed by first but not the element pointed by last.
valValue to search for in the range.
T shall be a type supporting comparisons with the elements pointed by InputIterator using operator== (with the elements as left-hand side operands, and val as right-hand side).
Returns
InputIterator An iterator to the first element in the range that compares equal to val.
If no elements match, the function returns last.

Definition at line 41 of file ch8_2.cc.

Referenced by main().

Here is the caller graph for this function: