title: How to use the priority queue STL for objects?
body: <pre><code>class Person
  {
  public:
      int age;
  };
  </code></pre>
  
  <p>I want to store objects of the class Person in a priority queue.</p>
  
  <pre><code>priority_queue&lt; Person, vector&lt;Person&gt;, ??? &gt;
  </code></pre>
  
  <p>I think I need to define a class for the comparison thing, but I am not sure about it.</p>
  
  <p>Also, when we write,</p>
  
  <pre><code>priority_queue&lt; int, vector&lt;int&gt;, greater&lt;int&gt; &gt; 
  </code></pre>
  
  <p>How does the greater work?</p>