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

email - PHP mail error ... failed to open stream : permission denied -

c# - ListView onScroll event -

c - Linux mmap() error -