#include<limits> std::numeric_limits<float>::max();就是 当然,C 的函数不也还能用吧:#include<climits>or#include<limits.h>