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 

On BDS2006 ,max() and min() function can't use

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





PostPosted: Fri Apr 14, 2006 7:03 am    Post subject: On BDS2006 ,max() and min() function can't use Reply with quote



Hi all:

On BDS2006 ,max() and min() function can't use, must declared as below:
#define max(a, b) (((a) > (b)) ? (a) : (b))
#define min(a, b) (((a) < (b)) ? (a) : (b))
On BCB60 we can define Project--> Options -->the Directories and
Conditionals page --> Conditionals-->Add this "_USE_OLD_RW_STL"
How can we do on BDS2006 ?
Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Fri Apr 14, 2006 8:03 am    Post subject: Re: On BDS2006 ,max() and min() function can't use Reply with quote



"BDS2006" <deepsleep (AT) ms65 (DOT) url.com.tw> wrote in message
news:443f4593$1 (AT) newsgroups (DOT) borland.com...

Quote:
On BDS2006 ,max() and min() function can't use

Why not? Please be more specific? What is the actual problem you are
having with them?


Gambit
Back to top
Clayton Arends
Guest





PostPosted: Fri Apr 14, 2006 5:03 pm    Post subject: Re: On BDS2006 ,max() and min() function can't use Reply with quote



Try this:

#include <algorithm>

int a = std::min(1, 0);
int b = std::max(a, 0);

-or-

#include <algorithm>
using namespace std;

int a = min(1, 0);
int b = max(a, 0);

-or-

#include <algorith.h>

int a = min(1, 0);
int b = max(a, 0);

As for using the old RogueWave STL the define is now "_USE_OLDER_RW_STL"

- Clayton
Back to top
hank
Guest





PostPosted: Tue Apr 18, 2006 4:03 am    Post subject: Re: On BDS2006 ,max() and min() function can't use Reply with quote

Thanks.

--
劉協理
"Clayton Arends" <nospam_claytonarends (AT) hotmail (DOT) com> 撰寫於郵件新聞:443fcbf9 (AT) newsgroups (DOT) borland.com...
Quote:
Try this:

#include <algorithm

int a = std::min(1, 0);
int b = std::max(a, 0);

-or-

#include <algorithm
using namespace std;

int a = min(1, 0);
int b = max(a, 0);

-or-

#include <algorith.h

int a = min(1, 0);
int b = max(a, 0);

As for using the old RogueWave STL the define is now "_USE_OLDER_RW_STL"

- Clayton
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Graphics) 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.