728x90
728x170
*[header][C library] climits (limits.h)
<climits> (limits.h)
Sizes of integral types
The limits for fundamental floating-point types are defined in
<cfloat>
(<float.h>
).The limits for width-specific integral types and other typedef types are defined in
<cstdint>
(<stdint.h>
).Macro constants
name | expresses | value* |
---|---|---|
CHAR_BIT | Number of bits in a char object (byte) | 8 or greater* |
SCHAR_MIN | Minimum value for an object of type signed char | -127 (-27+1 ) or less* |
SCHAR_MAX | Maximum value for an object of type signed char | 127 (27-1 ) or greater* |
UCHAR_MAX | Maximum value for an object of type unsigned char | 255 (28-1 ) or greater* |
CHAR_MIN | Minimum value for an object of type char | either SCHAR_MIN or 0 |
CHAR_MAX | Maximum value for an object of type char | either SCHAR_MAX or UCHAR_MAX |
MB_LEN_MAX | Maximum number of bytes in a multibyte character, for any locale | 1 or greater* |
SHRT_MIN | Minimum value for an object of type short int | -32767 (-215+1 ) or less* |
SHRT_MAX | Maximum value for an object of type short int | 32767 (215-1 ) or greater* |
USHRT_MAX | Maximum value for an object of type unsigned short int | 65535 (216-1 ) or greater* |
INT_MIN | Minimum value for an object of type int | -32767 (-215+1 ) or less* |
INT_MAX | Maximum value for an object of type int | 32767 (215-1 ) or greater* |
UINT_MAX | Maximum value for an object of type unsigned int | 65535 (216-1 ) or greater* |
LONG_MIN | Minimum value for an object of type long int | -2147483647 (-231+1 ) or less* |
LONG_MAX | Maximum value for an object of type long int | 2147483647 (231-1 ) or greater* |
ULONG_MAX | Maximum value for an object of type unsigned long int | 4294967295 (232-1 ) or greater* |
LLONG_MIN | Minimum value for an object of type long long int | -9223372036854775807 (-263+1 ) or less* |
LLONG_MAX | Maximum value for an object of type long long int | 9223372036854775807 (263-1 ) or greater* |
ULLONG_MAX | Maximum value for an object of type unsigned long long int | 18446744073709551615 (264-1 ) or greater* |
* the actual value depends on the particular system and library implementation, but shall reflect the limits of these types in the target platform.
Compatibility
LLONG_MIN, LLONG_MAX and ULLONG_MAX are defined for libraries complying with the C standard of 1999 or later (which only includes the C++ standard since 2011: C++11).See also
- <cfloat> (float.h)
- Characteristics of floating-point types (header)
728x90
그리드형(광고전용)
'Programming > C++' 카테고리의 다른 글
[header][C library] csignal (signal.h) (0) | 2017.11.08 |
---|---|
[header][C library] csetjmp (setjmp.h) (0) | 2017.11.08 |
[header][C library] cmath (math.h) (0) | 2017.11.08 |
[header][C library] clocale (locale.h) (0) | 2017.11.08 |
[header][C library] ciso646 (iso646.h) (0) | 2017.11.08 |
[header][C library] cinttypes (inttypes.h) (C++11) (0) | 2017.11.08 |
[header][C library] cfloat (float.h) (0) | 2017.11.08 |
[header][C library] cfenv (fenv.h) (C++11) (0) | 2017.11.08 |