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-


Also where can I find good tutorials on STLs?


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

Thanks! It Worked

For good editorials on STL refer to and

Also a crash course is available at and

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

Happy Coding :slight_smile:

1 Like