Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

how to change the value of a key in hashmp in c++

std::map<char, int> m;
m.insert(std::make_pair('c', 0));  // c is for cookie

std::map<char, int>::iterator it = m.find('c'); 
if (it != m.end())
    it->second = 42;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #change #key #hashmp
ADD COMMENT
Topic
Name
4+3 =