 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
BDS2006 Guest
|
Posted: Fri Apr 14, 2006 7:03 am Post subject: On BDS2006 ,max() and min() function can't use |
|
|
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
|
Posted: Fri Apr 14, 2006 8:03 am Post subject: Re: On BDS2006 ,max() and min() function can't use |
|
|
"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
|
Posted: Fri Apr 14, 2006 5:03 pm Post subject: Re: On BDS2006 ,max() and min() function can't use |
|
|
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
|
Posted: Tue Apr 18, 2006 4:03 am Post subject: Re: On BDS2006 ,max() and min() function can't use |
|
|
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 |
|
 |
|
|
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
|
|