How do I use unordered_map?

I have been using maps a lot lately.Recently I tried unordered_map.
I simply took the same syntax. But changed the declaration to ‘unordered_map’ instead of ‘map’.

I shows compilation error. What is the problem?

Here’s a link to the code-


[1]

Also where can I find good tutorials on STLs?


  [1]: http://ideone.com/H12vJv

just change the version to c++14 in ideone. For studying stl link1, link2.

Thanks! It Worked

For good editorials on STL refer to http://en.cppreference.com and http://www.cplusplus.com/reference

Also a crash course is available at https://community.topcoder.com/tc?module=Static&d1=features&d2=020807 and https://www.topcoder.com/community/data-science/data-science-tutorials/power-up-c-with-the-standard-template-library-part-1/

Basically the topcoder also list one of the best macros used by programmers for stl in generalised way.

Happy Coding :slight_smile:

1 Like