title: Reverse Sort for a Templated Heap class
body: <p>I have created a Templated Heap Class and have managed to sort the list in ascending order through the use of a custom iterator class, i was just wondering how i would sort it in reverse order.</p>
  
  <pre><code>template &lt;typename T&gt;
  inline void Heap&lt;T&gt;::sort_heap(DynamicArrayIter&lt;T&gt; first, DynamicArrayIter&lt;T&gt; second) {
      int size = 0;
      for (DynamicArrayIter&lt;T&gt; iter = first; iter != second; ++iter) {
          size++;
      }
      T temp;
      for (int i = 0; i &lt; size; i++) {
          for (int j = 0; j &lt; size - 1; j++) {
              if (contents.at(j) &lt; contents.at(i)) {
                  temp = contents.at(i);
                  contents.at(i) = contents.at(j);
                  contents.at(j) = temp;
              }
          }
      }
  }
  </code></pre>
  
  <p>Thanks,Soz could not get code insert to work...</p>