大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。
Jetbrains全系列IDE稳定放心使用
一.
find函数存在于算法中
其头文件为#include<algorithm>
二.
代码示例:
#include<vector>
#include<algorithm>
#include<iostream>
using namespace std;
int main()
{
vector<int>L;
L.push back(1);
L.push back(2);
L.push back(3);
vector<int>::iterator it=find(L.begin(),L.end(),3);
if(it==L.end())
cout<<"NO"<<endl;
else
cout<<"YES"<<endl;
}
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/183673.html原文链接:https://javaforall.net