Limits of each type in c++
<climits>
This C library includes constants for the limits of each type:
CHAR_BIT, SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, CHAR_MIN, CHAR_MAX, MB_LEN_MAX, SHRT_MIN, SHRT_MAX, USHRT_MAX, INT_MIN, INT_MAX, UINT_MAX, LONG_MIN, LONG_MAX, ULONG_MAX, LLONG_MIN, LLONG_MAX, ULLONG_MAX
<limits>
Unlike <climits>, this C++ library includes functions to handle the limits of each type:
- Minimum value for any primitive type
T:
std::numeric_limits<T>::min()
- Maximum value for any primitive type
T:
std::numeric_limits<T>::max()