c++ - Why STL algorithm find() doesn't work on maps? -
Is there any explanation why () does not work for the algorithm map and use the map for it?
- This works on the map, but you need to compare the
map: Value_type
(which isstd :: pair and lt; const map :: key_type, map :: mapped_type & gt;
), not the main type. - Because map.find takes a key and returns a key / value pair repeater.
Comments
Post a Comment