开挂的map
来源:互联网 发布:cnas 软件测试实验室 编辑:程序博客网 时间:2024/05/21 22:31
转自:http://blog.csdn.net/sunshinewave/article/details/8067862
#include<iostream>#include<map>#include<algorithm>using namespace std;int main(){ map<int,string>mapstudent; mapstudent.insert(pair<int,string>(1,"student_one")); mapstudent.insert(pair<int,string>(2,"student_two")); mapstudent.insert(pair<int,string>(3,"student_three")); map<int,string>::iterator iter; for(iter=mapstudent.begin();iter!=mapstudent.end();iter++) { cout<<iter->first<<" "<<iter->second<<endl; } cout<<endl; mapstudent[1]="student_one"; mapstudent[2]="student_two"; mapstudent[3]="student_three"; for(iter=mapstudent.begin();iter!=mapstudent.end();iter++) { cout<<iter->first<<" "<<iter->second<<endl; } int map_size=mapstudent.size(); cout<<map_size<<endl; mapstudent.clear(); if(mapstudent.empty()) cout<<"lalalala"<<endl;}
0 0
- 开挂的map
- 【Map】Map.Entry的使用
- 【Map】Map集合的遍历:
- disco开源的map-reduece
- 另一种遍历Map的方式: Map.Entry 和 Map.entrySet()
- map<Strng map<string map>>类型的值获取
- Map日常--Map的复制,Map不可修改UnsupportedOperationException
- map、list、map(Object,map)的前台获取遍历
- 另一种遍历Map的方式: Map.Entry 和 Map.entrySet()
- 另一种遍历Map的方式 Map.Entry 和 Map.entrySet()
- 另一种遍历Map的方式: Map.Entry 和 Map.entrySet()
- 另一种遍历Map的方式: Map.Entry 和 Map.entrySet()
- Map和Map<key,value>及Map<String, ?>的区别
- Map.Entry和map.entrySet()---更好的遍历Map
- JAVA Map 遍历Map 集合 map 的嵌套
- Map 是错误的 要写成 Map
- Map 是错误的 要写成 Map
- MAP--复杂map结构的构造
- 仓位计算器
- 基于MT7688模块的开发笔记13——给MT7688开发板添加tftp等功能
- How to Install JAVA 8 (JDK 8u91) on Ubuntu & LinuxMint via PPA
- FreeRTOS高级篇4---FreeRTOS任务切换分析
- Spring MVC 解决跨域问题&以及对@RequestBody的理解
- 开挂的map
- 高精度减法——一步一步算法篇
- 在spark中使用Hive报错error: not found: value sqlContext
- uva Ugly Numbers
- chrono
- Java核心之I/O;
- spark 1.3.1以上的集群搭建流程
- 第八周项目三-指向学生类的指针
- TextView的setOnClickListener