title: C++ STL : Using map with priority_queue
body: <p>I'm trying to implement Huffman coding by saving letters and their corresponding values into a map then inserting the map into a priority queue.  I am getting a parameter conversion error when I try to declare my queue. What exactly am I supposed to put as the parameters? What I have here was my best guess.</p>
  
  <pre><code>void main()
  {
   ifstream doc("doc.txt"); 
   map&lt;char, int&gt; C;
   char letter;
   while(!doc.eof()){
    doc.get(letter);
    if(letter &gt;= 'a' &amp;&amp; letter &lt;= 'z')
     C[letter]++;
   }
   priority_queue&lt;int, map&lt;char,int&gt;, greater&lt;int&gt; &gt; Q(C); //also tried greater&lt;map&lt;char,int&gt;&gt;
   /*map&lt;char, int&gt;::const_iterator it;
   for(it = C.begin(); it != C.end(); it++)
    cout&lt;&lt;it-&gt;first&lt;&lt;" "&lt;&lt;it-&gt;second&lt;&lt;endl;*/
  }
  </code></pre>
  
  <p>I feel kind of dumb asking this but thorough googling did not get me the answer. Thanks a lot for the help!</p>