map和multimap容器的基本使用
map是STL的一个关联容器,它提供一对一的hash
Key-value:键值匹对
Map中key不可重复,value可重复
内部实现:红黑树
键值可以是自定义的数据
Map<type,type>名
map内部元素有序(根据key来堆大项)
插入方式:主分两种
Map<int,string>map1;
1.array式
map1[int]=string
map1[1]=”l...
原创
2020-02-21 16:34:43 ·
194 阅读 ·
0 评论