Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

modify value in map 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: #modify #map
ADD COMMENT
Topic
Name
4+2 =