1 #include<bits/stdc++.h> 2 using namespace std; 3 int main() 4 { 5 map<int,string> m; 6 //数据的插入 7 m[1]="zhangsan"; 8 m[2]="lisi"; 9 m[3]="wangwu"; 10 m[4]="zhaoliu";
13 cout<<m[1]; 14 return 0; 15 }
1 #include<bits/stdc++.h> 2 using namespace std; 3 int main() 4 { 5 map<int,string> m; 6 //数据的插入 7 m[1]="zhangsan"; 8 m[2]="lisi"; 9 m[3]="wangwu"; 10 m[4]="zhaoliu";
13 cout<<m[1]; 14 return 0; 15 }
转载于:https://www.cnblogs.com/laoyangtou/p/10602755.html