You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#include<bits/stdc++.h>
|
|
using namespace std;
|
|
int main()
|
|
{
|
|
int a[] = {1,2,3};
|
|
set<int> s(a,a+3);
|
|
set<int>::iterator iter;
|
|
if((iter = s.find(2)) != s.end())
|
|
{
|
|
cout<<*iter<<endl;//输出为2
|
|
}
|
|
return 0;
|
|
}
|