set用法2之查找
来源:互联网 发布:购票软件排行 编辑:程序博客网 时间:2024/06/15 08:22
# include <iostream># include <set>using namespace std;//宏定义 typedef set<int> SETINT;int main(){ SETINT a; a.insert(23); a.insert(-1); a.insert(78); a.insert(100); a.insert(5); SETINT::const_iterator i; for(i=a.begin(); i!=a.end();i++){ cout<<*i<<endl; } cout<<endl; //find查找是否含有-1,可以查找不能直接修改,只有删除在插入 //返回加个是迭代器 SETINT::iterator i_found = a.find(-1); if(i_found!=a.end()){ cout<<*i_found<<endl; } return 0;}
0 0
- set用法2之查找
- STL之Set:Set的基本用法
- STL之Set:Set的基本用法
- STL之Set:Set的基本用法
- android之set接口用法
- STL之 set的用法
- STL之set 的用法
- C++之set用法总结
- STL之五:set/multiset用法详解
- 【C++ STL学习之七】set用法
- 类集框架之Set简单用法
- STL之二:set/multiset用法详解
- STL之五:set/multiset用法详解
- STL之五:set/multiset用法详解
- STL之五:set/multiset用法详解
- STL之set的基本用法
- STL之五:set/multiset用法详解
- C++ STL之set常见用法
- 批量删除
- Node.js读书笔记
- Go GC: Prioritizing low latency and simplicity
- hdu 1074 doing homework
- C++---if(!cin)与if(!(cin >> xxx))
- set用法2之查找
- hdu4417Super Mario 树状数组+二分
- hadoop之HDFS
- 振动流化床干燥机的作用和特点
- jquery中的事件
- 在netbeans中实现与数据库的连接方法
- Best Practices for AWS Security Using CloudCheckr
- HDU 5073 Galaxy (贪心)
- poj2780Linearity【共线】