【STL】find示例
来源:互联网 发布:辰森餐饮软件 编辑:程序博客网 时间:2024/05/17 03:58
find声明:
template<class InputIterator, class Type> InputIterator find( InputIterator _First, InputIterator _Last, const Type& _Val );示例:
void test_find(){std::list <int> L;std::list <int>::iterator Iter;std::list <int>::iterator result;L.push_back(40);L.push_back(20);L.push_back(10);L.push_back(30);L.push_back(10);std::copy(L.cbegin(), L.cend(), std::ostream_iterator<int>(std::cout, " "));std::cout << std::endl;result = std::find(L.begin(), L.end(), 10);if (result == L.end())std::cout << "There is no 10 in list L.";else {std::cout << "There is a 10 in list L";if (++result != L.end())std::cout << " and it is followed by a " << *result << ".";}std::cout << std::endl;}
- 【STL】find示例
- STL find()
- STL--find()
- find示例
- find示例
- STL algorithm find
- STL 之 find find_if
- STL find函数
- STL中的find函数
- stl std::find使用
- STL 关于find()
- STL中的find函数
- 【STL】find的用法
- STL之find
- stl find和find_if
- STL map: [] 还是find
- STL算法:find、fill
- STL find 算法
- LeetCode : Triangle
- 受控wifi接入的网络编程
- 标准类型运算符和内建函数
- 个人对kobject的一点研究[1]
- 程序员习惯
- 【STL】find示例
- ubuntu下的安装工具apt-get
- 一个软件图标大全的网站
- 非零环绕数规则和奇-偶规则(Non-Zero Winding Number Rule&&Odd-even Rule)
- AIDL总结
- 15周任务2:杨辉三角形
- 【开发文档】软件开发所需要的十三个文档
- C# ajax.dll和ajaxpro.dll的使用方法和基本原理
- hadoop单机安装配置及测试通过