+ 1
C++ Hash Maps?
How exactly do I use a hash map? Google just gives me articles defining what a hash map is, but I can't seem to find an example of any kind. Can somebody write a hash map c++ code for me?
4 Réponses
+ 3
Well, we have std::map and std::unordered_map in STL. If you're not looking to implement it yourself, you can start experimenting with these two classes, to get an understanding of how elements are accessed when stored as a key-value pair.
https://en.cppreference.com/w/cpp/container/map/map
I just worked with std::map recently:
https://code.sololearn.com/c1lMn34wFq8v/?ref=app