title: qsort for sorting an array of objects
body: <p>I'm trying to use the qsort() to sort an array of object pointers (PointP = Point*)
  attached is the compare function and the sorting, The problem is that nothing happens and sorting doesn't occur.</p>
  
  <pre><code>int compareByAngleP(const void* elem1,const void* elem2) {
      PointP point1 = (PointP) elem1;
      PointP point2 = (PointP) elem2;
      if (abs(point1-&gt;getAngle() - point2-&gt;getAngle())&gt;0.001)
      {
          return point1-&gt;getAngle() - point2-&gt;getAngle();
      }
      return  point1-&gt;getY() - point2-&gt;getY();
  }
  
  void sortArrayP(PointP* array, int size) {
      qsort(array,size, sizeof(PointP), compareByAngleP);
  }
  </code></pre>