VC里面好象不在你说的这个头文件里。#include
#include
#include
void main()
{
int i, i1, i2;
i1 = 3;
i2 = 5;
i = min(i1, i2);
printf("min of i1 & i2 = %d\n", i);
}
函数原型:
min(value1, value2 );
参数:
value1
Specifies the first of two values.
value2
Specifies the second of two values.
返回值:
The return value is the smaller of the two specified values.
备注:
#define min(a, b) (((a) < (b)) ? (a) : (b))
自已可以定义一个:
#define minv(x,y) ( (x>y)?y:x)
= =!min?得需要调用函数吧 algorithm是sort的头文件吧。。