find函数
来源:互联网 发布:景区规划图软件 编辑:程序博客网 时间:2024/06/11 02:04
这个也是直接贴代码吧,比较简单
#include <string>#include <iostream>#include <vector>#include <algorithm>int main(){ std::string str1 = "hello"; std::vector<std::string> svec; svec.push_back("Hello"); svec.push_back("World"); svec.push_back("Baidu"); svec.push_back("Study"); svec.push_back("Hard"); std::vector<std::string>::iterator iter; for(iter = svec.begin(); iter != svec.end(); ++ iter) if(*iter == str1) break; iter = find(svec.begin(), svec.end(), str1); if(iter != svec.end()) std::cout << "Yes" << std::endl; else std::cout << "No" << std::endl; return 0;}
0 0
- find函数
- find函数
- find函数
- find()函数
- find函数
- find函数
- vector 自定义find函数
- STL find函数
- PB函数--find
- STL中的find函数
- STL中的find函数
- matlab 中的find()函数
- string find查找函数
- find函数 笔记
- C++函数CString::find
- matlab find函数详解
- matlab之find函数
- string.find()函数用法
- Android 学习(一)
- ios开发如何让navigationItem自带的返回按钮设置成图片或者不显示文字
- Hibernate三种状态
- SQLServer查询数据加一列序号
- Python学习笔记(一)
- find函数
- 黑马程序员 Java基础——异常
- unity3d实现NPC显示名称
- 清除Android工程中没用到的资源
- hmailserver管理工具汉化
- org.hibernate.hql.ast.QuerySyntaxException: buyer is not mapped
- linux shell用法(2)-- 日期显示(1)
- 对关系演算的认识
- python连接oracle