title: C++ STL map with a custom class as second type
body: <p>I'd like to create a map with an int and my own custom class.  Is there a way to do this?</p>
  
  <pre><code>map&lt;int, MyClass&gt; myMap;
  </code></pre>
  
  <p>If not, how do I go about accomplishing this?  Basically, I want an id(or preferably an <code>enum</code>) to point to my own custom class.  In most other languages, this would be a simple hash.</p>