I wondered when i put a value to it's key in two ways :
map<string, int> m;
m["a"] = 20;
and:
m.insert(make_pair("a", 20));
what is the difference between them? Thanks.
I wondered when i put a value to it's key in two ways :
map<string, int> m;
m["a"] = 20;
and:
m.insert(make_pair("a", 20));
what is the difference between them? Thanks.