title: Can map contain class objects or class objects?
body: <p>Can map contain class objects or  class objects?</p>
  
  <p>I think key should be a built-in primary type, its associated data value can a class or class object. </p>
  
  <p>For example, </p>
  
  <pre><code>stl::map&lt;int , myClass&gt; myMap;
  myMap.insert(pair&lt;int , myClass&gt;);
  </code></pre>
  
  <p>Is it possible for key to be a self-defined class ? </p>
  
  <pre><code>stl::map&lt;myClass , int&gt; myMap;
  </code></pre>
  
  <p>if yes, how to sort the key ? </p>
  
  <p>thanks</p>