C++ 算法algorithm的使用(更新中...)

概述

std::find()  //查找容器中指定元素,查找成功返回该元素第一个迭代器,失败返回最后一个迭代器

1.find()函数

函数声明:

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

输入起始和结束迭代器,查找成功返回该元素第一个迭代器,失败返回最后一个迭代器

猜你喜欢

转载自www.cnblogs.com/jainszhang/p/10662453.html