C++获取各种类型最大、最小值方法

以int为例,最大值是(numeric_limits<int>::max)(),最小值是(numeric_limits<int>::min)()

其他类型类似

你可能感兴趣的:(C++获取各种类型最大、最小值方法)