Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits\stdc++.h>
- using namespace std;
- int main (){
- map<string,int> mp;
- mp["Sadia"]=10;
- mp["Sanjida"]=20;
- mp["Susmita"]=30;
- mp["Sagor"]=40;
- mp.insert(make_pair("Sadia",10));// we can also call like this
- map<string, int>::iterator it;
- for(it=mp.begin(); it!=mp.end(); ++it){
- cout << it->first <<" = "<<it->second<< '\n';
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment