title: Priority queue for user-defined types
body: <p>I have the below struct</p>
  
  <pre><code>struct node{
     float val;
     int count;
  
  }
  </code></pre>
  
  <p>I have several objects of this struct. Now, I want to insert these objects into a priority queue of STL such that the priority queue orders the items by count. Any idea on how to do so? Preferably a min heap is preferred. I know how to do the above for primitive data types, not structs</p>