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?

  1. This works on the map, but you need to compare the map: Value_type (which is std :: pair and lt; const map :: key_type, map :: mapped_type & gt; ), not the main type.
  2. Because map.find takes a key and returns a key / value pair repeater.

Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -