#include <iostream>
#include <map>
#include <string>
using namespace std;


int main()
{
	 map<string, int> map1;
	 map1[string("tttt")] = 1;
	 map1[string("ggg")] = 2;
	 map1.insert(pair<string, int>("niubi", 3));
	 map<string, int>::iterator it = map1.begin();
	 while ( it != map1.end())
	 {
	  
		 cout<<it->first<<" "<<it->second<<endl;
	  it++;
	 }
	 system("pause");
	 return 0;

}


Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐