title: Pair inside priority queue
body: <p>I am trying to store pairs in priority queue and I am using a compare function that compares second value of each pair.</p>
  
  <pre><code>#include&lt;iostream&gt;
  #include&lt;queue&gt;
  #include&lt;utility&gt;
  using namespace std;
  
  class CompareDist
  {
  public:
      bool operator()(pair&lt;int,int&gt; n1,pair&lt;int,int&gt; n2) {
          return n1.second&gt;n2.second;
      }
  };
  int main()
  {
      priority_queue&lt;pair&lt;int,int&gt;,CompareDist&gt; pq;
  }
  </code></pre>
  
  <p>When I compile this I get an error</p>
  
  <pre><code>error: no type named ‘value_type’ in ‘class CompareDist’
  </code></pre>
  
  <p>What could be the reason.I am new to STL.</p>