why doesnt the new key val pair overwrite the old key val pair??
how can i do it??
int n;
cin>>n;
char a;
string b;
unordered_map<char,string> um;
for(int i=0; i<n; i++)
{
cin>>a;
cin>>b;
um.insert(make_pair(a,b));
}
for(auto p:um)
cout<<p.first<<","<<p.second<<endl;
input : 2
a apple
a angry
output: a,apple