gibsjose / cpp-cheat-sheet

C++ Syntax, Data Structures, and Algorithms Cheat Sheet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update C++ Sheet

gibsjose opened this issue · comments

The data structures and algorithms sheet is pretty much filled out, but the C++ sheet is lacking...

drank in java, such a cheat

Great overview. Your find function in your map says m.find("value") returns "key". I think you you switch "key" and "value". I believe that the find() method in takes a "key" not a "value".

@mo-messidi You're absolutely right. std::map does not include a method to search by value. You can use find_if with a comparison method, or Boost's Bimap.

I'll update to fix that. Thanks!

std::multiset is missing

@B1Z0N thanks for helping fill the C++ cheat sheet out!