map函数
来源:互联网 发布:杨凯 黄金分割线 源码 编辑:程序博客网 时间:2024/06/05 17:20
map函数这里有三种方法,我只学了数组,感觉功能都一样。。。
第三种:用数组方式插入数据,下面举例说明
#include <map> #include <string> #include <iostream> using namespace std; int main() { map<int, string> mapStudent; mapStudent[1] = "student_one"; mapStudent[2] = "student_two"; mapStudent[3] = "student_three"; map<int, string>::iterator iter; for(iter = mapStudent.begin(); iter != mapStudent.end(); iter++) cout<<iter->first<<' '<<iter->second<<endl; }
阅读全文
0 0
- map 函数
- Map 函数
- map函数
- map函数
- map函数
- map()函数
- 【map函数】
- map函数
- map()函数
- map函数
- map函数
- filter()函数 map()函数
- 函数编程-map()
- perl map函数使用
- map自定义比较函数
- map自定义比较函数
- c++ map 函数
- perl map函数学习
- 序列化
- 编译安装Nginx+php
- 为啥你会觉得很忙或者很闲
- CentOS 7下 ifconfig command not found
- 使用Maven搭建Struts2.3.34项目
- map函数
- 五分钟学会markdown
- go语言学习-变量
- MOOC课程资源
- 风火轮 树莓派3 android系统编译
- 海量数据处理算法—Bloom Filter
- [深度学习论文笔记][arxiv 1711] Non-local Neural Networks
- redis
- XGBoost解析系列-原理