How can I sort RArray in descending order ?

Login to reply to this topic.
Thu, 2008-01-10 05:47
Joined: 2007-05-24
Forum posts: 22

How can I sort RArray in descending order ?

class TSample
{
public:
TBuf8<20> Name;
TInt Marks;
};

RArray sampleArray(8,_FOFF(TSample,Marks));

// Now Assume some data added to the samleArray

sampleArray.SortSigned();

Is it possible to sort samplearray in descending order by SortSigned function() ?

I know this may be possible by
sampleArray.Sort(TLinearOrder< T > anOrder);


Thu, 2008-01-10 11:45
Joined: 2004-11-29
Forum posts: 1232
Re: How can I sort RArray in descending order ?

No. SortSigned only sorts in signed integer order, ascending.

use Sort(TLinearOrder< T > anOrder);

  • Login to reply to this topic.