title: C++ List sort function
body: <p>I don't know how to correctly implement the a sort for a list in C++. I am getting the build errors: </p>
  
  <blockquote>
    <p>'Ranker::compare': function call missing argument list; use <code>'&amp;Ranker::compare'</code> to create a pointer to member</p>
  </blockquote>
  
  <p>How do I correctly implement my sort function for the list?</p>
  
  <p>Ranker.h:</p>
  
  <pre><code>list&lt;Competitor*&gt; sorted;
  </code></pre>
  
  <p>Ranker.cpp:</p>
  
  <pre><code>bool Ranker::compare(Competitor* first, Competitor* second) {
      if (first-&gt;getTime() &lt; second-&gt;getTime())
          return true;
      else
          return false;
  }
  
  int Ranker::addList(Competitor* starter) {
      sorted.push_back(starter);
      sorted.sort(compare);
  }
  </code></pre>