VC6.0的algorithm中的怎么没有max函数,2003的SDK也没有。
是不是C++版本的原因,可是我在C++reference上面看到里面是由这个函数的啊?
[解决办法]
max未必要在 <algorithm> 里呀。
自己全目录搜索一下就找得到了呀。
在 <xutility> 文件里,
#define _IMPL_MAX max
#define _IMPL_MIN min
。。。
// TEMPLATE FUNCTION max
template <class _Ty> inline
const _Ty& (__CLRCALL_OR_CDECL _IMPL_MAX)(const _Ty& _Left, const _Ty& _Right)
{// return larger of _Left and _Right
return (_DEBUG_LT(_Left, _Right) ? _Right : _Left);
}