#include<bits/stdc++.h>
using namespace std;
int main()
{
map<string,int> data;
data["Aakash"] =93;
data["Karan"] =73;
data["Vipin"] =33;
// Insert Element in map
// data.insert({{"Rizwan",86},{"Rohit",75}});
map<string,int> :: iterator it;
for(it=data.begin();it!=data.end(); it++){
cout<<(*it).first<<" "<<(*it).second<<"\n";
}
// cout<<"The size of map is: "<<data.size()<<endl;
// cout<<"The Max size of map is: "<<data.max_size()<<endl;
// cout<<"The Map will return: "<<data.empty()<<endl;
return 0;
}
Comments
Post a Comment