STL之multiset
来源:互联网 发布:root刷机软件 编辑:程序博客网 时间:2024/06/04 18:56
multiset同set相似,唯一的不同就是set中的元素是唯一的,multiset对于同一值可以出现多次,直接就给个基本操作的例子:
void func1() { multiset<int> ms; int temp; cout << "请输入值:"; cin >> temp; while (temp != 0) { ms.insert(temp); cout << "请输入值:"; cin >> temp; } multiset<int>::iterator it = ms.begin(); while (it != ms.end()) { cout << *it << " "; it++; } cout << endl; while (ms.size() > 0) { multiset<int>::iterator it = ms.begin(); cout << *it << " "; ms.erase(it); }}
输出结果;
0 0
- STL之multiset应用。
- STL之multiset简介
- STL 之 multiset 多集
- STL之 multiset
- STL之multiset简介
- stl之multiset,multimap
- STL之multiset
- STL之Multiset
- stl库之set、multiset
- STL 之 multiset 源码剖析
- STL之set和multiset
- STL容器之Set,MultiSet
- STL容器之set/multiset
- STL之set/multiset容器
- STL之set和multiset
- STL MultiSet
- stl multiset
- STL multiset
- .Net Core[译文]
- XMPPFramework的使用
- R语言——Plot{graphics}
- 彻底理解View事件体系!
- encrypt加密 decrypt解密 函数
- STL之multiset
- [Leetcode]83. Remove Duplicates from Sorted List
- jenkins+git+maven+centos7自动化构建部署项目(一)
- Ubuntu 火狐浏览器中,鼠标选择文字被删除的解决办法
- 通过JS判断Jsion中是否存在某些字段
- Javascript 面向对象编程(一):封装
- wuzhicms 模块开发
- Android开发环境之eclipse报DDMS错
- Javascript面向对象编程(二):构造函数的继承