1、map是STL容器中的一种,属于关联性容器。以key value的形式存储。key必须唯一。如果重复则插入失败。插入后按照key默认排序。必须要先声明命名空间:using namespace std;2、例如:#include<map>#include<string>using namespace std;void main(){ map<int,string>h;}
map容器的使用
原文:http://www.cnblogs.com/thunder-wu/p/5989233.html