C++ STL 算法:查找算法(4)find_first_of
来源:互联网 发布:windows 挂载iOS 编辑:程序博客网 时间:2024/06/17 20:24
1、find_first_of(b,e,sb,se)
例:find_first_of(ivec.begin(),ivec.end(),searchList.begin(),searchList.end());
cout << "找到了! 位置: " << distance(ivec.begin(), pos) + 1 << endl;
2、find_first_of(b,e,sb,se,bp)
3、没有find_last_of算法,只能使用逆向迭代器
vector<int>::reverse_iterator rpos = find_first_of(ivec.rbegin(), ivec.rend(),searchList.begin(),searchList.end());
cout << "找到的位置: " << distance(ivec.begin(),rpos.base()) << endl;//这里不用加1
cout << "找到的位置: " << distance(ivec.begin(),rpos.base()) << endl;//这里不用加1
0 0
- C++ STL 算法:查找算法(4)find_first_of
- c++之STL(13) STL 算法 - 查找算法(4)find_first_of(b,e,sb,se) find_first_of(b,e,sb,se,bp)
- STL algorithm算法find_first_of(18)
- STL_算法_查找算法(find_first_of、find_last_of)
- STL算法------查找4
- c++之STL(13) STL 算法 - 查找算法(1)
- STL算法---查找算法(一)
- STL算法---查找算法(二)
- STL算法---查找算法(三)
- STL算法---查找算法(四)
- STL 查找算法
- STL查找算法
- STL算法------查找1
- STL算法------查找2
- STL算法------查找3
- STL算法------查找5
- STL算法之查找
- STL算法之查找
- 计算个人所得税
- 微信iOS终端SDK开发新手教程
- 使用unity3d需要注意到细节
- Docker实践5:搭建redmine
- 禁止访客复制网页内容
- C++ STL 算法:查找算法(4)find_first_of
- thinkphp的各种内部函数 D()、F()、S()、C()、L()、A()、I()详解--------转载
- 事件委托机制实现GameObject之间的通信
- 分支-11. 计算工资(15)
- poj解题报告——1850
- Unity AssetBundle爬坑手记
- zoj 1914 && poj 2349 Arctic Network
- Spark SQL-2-Scala代码中
- LeetCode 32.Longest Valid Parentheses