How can I write a static library for sorting an unknown type array of object pointers in C++
<p>I started learning c++ not a long time ago, and I've got a tricky problem...</p>

<p>I have to write a static library, which is able to sort ANY type arrays of objects, and I don't really know how to do it... What to write in the header of function? </p>

<pre><code>#ifndef SORTER

#define SORTER

class sorter
{

public:

    static array* bubblesort(array*,int size_t);
};

#endif
</code></pre>

<p>This solution is the best that I could do, but of course  it doesnt work...</p>

<p>What I would like to sort:</p>

<pre><code>int main()
{
    const unsigned maxEquipment=7;
    Equipment* equipments[maxEquipment];

    equipments[0]=new Equipment(1,200);
    equipments[1]=new Printer(2,12000,12000);
    equipments[2]=new Display(3,2000,6);
    equipments[3]=new Printer(4,312000,51000); ...........
</code></pre>

<p>NOTE: I cant use any kind of sorter function from standard lirary!</p>

<p>Any ideas what to do?</p>
