positive and negative infinity for integral types in c++
问题 I am reading about positive and negative infinity in c++. I read that integral types dont have a infinite value ie. std::numeric_limits<int>::infinity(); wont work, but std::numeric_limits<int>::max(); will work and will represent the maximum possible value that can be represented by the integral type. so the std::numeric_limits<int>::max(); of the integral type could be taken as its positive infinite limit ? Or the integral type has only the max value and the infinity value is not true ? 回答1