PRODUCT : Borland C++ NUMBER : 1307 VERSION : ALL OS : ALL DATE : October 25, 1993 PAGE : 1/1 TITLE : Why aren't max and min defined in C++ mode? Why aren't max() and min() defined when I'm compiling a C++ program? The reason is that max() and min() are macros that are not defined if C++ is being used. C++ programmers may very well want to overload the max() and min() functions to provide extended functionality for comparing (for example) two strings, and this wouldn't be possible if they were defined as macros. If you are using C++ and you still want the old max() and min() functions, you can include the following two lines in your code or in a header file: #define max(a,b) (((a) > (b)) ? (a) : (b)) #define min(a,b) (((a) < (b)) ? (a) : (b)) DISCLAIMER: You have the right to use this technical information subject to the terms of the No-Nonsense License Statement that you received with the Borland product to which this information pertains.