title: unordered_map hash function c++
body: <p>I need to define an unordered_map like this <code>unordered_map&lt;pair&lt;int, int&gt;, *Foo&gt;</code>, what is the syntax for defining and passing a <code>hash</code> and <code>equal</code> functions to this map?</p>
  
  <p>I've tried passing to it this object:</p>
  
  <pre><code>class pairHash{
  public:
      long operator()(const pair&lt;int, int&gt; &amp;k) const{
          return k.first * 100 + k.second;
      }
  };
  </code></pre>
  
  <p>and no luck:</p>
  
  <pre><code>unordered_map&lt;pair&lt;int, int&gt;, int&gt; map = unordered_map&lt;pair&lt;int, int&gt;, int&gt;(1,
  *(new pairHash()));
  </code></pre>
  
  <p>I have no Idea what is the <code>size_type_Buskets</code> means so I gave it <code>1</code>.
  What is the right way to do it?
  Thanks.</p>