map容器对象插入数据的4种方式
#include
#include
#include
#include
using namespace std;
int main()
{
map
//通过键值赋值
Employee[123] = "Mayuefei";
//通过成员函数insert和STL的pair赋值
Employee.insert(pair
//通过value_type赋值
Employee.insert(map
//通过make_pair赋值
Employee.insert(make_pair(234, "LLK.D"));
for ( map
{
cout<<(*it).first<<":"<<(*it).second< } system("pause"); return 1; };