max
min
Expand Minimize
This topic has not yet been rated - Rate this topic

max macro

The max macro compares two values and returns the larger one. The data type can be any numeric data type, signed or unsigned. The data type of the arguments and the return value is the same.

Syntax


 max(
   value1,
   value2
);

Parameters

value1

Specifies the first of two values.

value2

Specifies the second of two values.

Return value

The return value is the greater of the two specified values.

Remarks

The max macro is defined as follows:



#define max(a, b)  (((a) > (b)) ? (a) : (b)) 


Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Windef.h

 

 

Build date: 10/27/2012

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.