BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to Use stable_sort for TPoint array?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Language)
View previous topic :: View next topic  
Author Message
Wiz
Guest





PostPosted: Thu Jan 05, 2006 4:22 pm    Post subject: How to Use stable_sort for TPoint array? Reply with quote



Hi everybody,

I have lots of trouble when I try to use stable_sort algorithm so Ican
readjust hte TPoitn values
within TPoint arrea in the following manner

TPoint OldArray[4], NewArray[4];

OldArray[0].x = 200; OldArray[0].y = 400;
OldArray[1].x = 300; OldArray[1].y = 300;
OldArray[2].x = 100; OldArray[2].y = 500;
OldArray[3].x = 150; OldArray[3].y = 200;

The value within NewArray would be something like this:

NewArray[0].x = 150; NewArray[0].y = 200;
NewArray[1].x = 300; NewArray[1].y = 300;
NewArray[2].x = 200; NewArray[2].y = 400;
NewArray[3].x = 100; NewArray[3].y = 500;

However, the BCB6 compiler keeps complaining as follows:

[C++ Error] _function_base.h
"E2093 Operator 'operator <' not implemented in type 'TPoint' for
arguments of the same type"

How can I dealwith this kind of problem? Any alternative so I can dela
with stable_sort problem wihotu headache .....
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Language) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.