D
desktop
If I have:
std::map<int,int> m;
where I have:
m.insert(std::make_pair(1,2));
how do I update the value to 7 associated with key = 1?
I was thinking:
(*m.find(1)).second = 7;
But is there no simpler way?
std::map<int,int> m;
where I have:
m.insert(std::make_pair(1,2));
how do I update the value to 7 associated with key = 1?
I was thinking:
(*m.find(1)).second = 7;
But is there no simpler way?