[ACCEPTED]-What do __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS mean?-macros
__STDC_LIMIT_MACROS
and __STDC_CONSTANT_MACROS
are a workaround to allow C++ programs 9 to use stdint.h
macros specified in the C99 standard 8 that aren't in the C++ standard. The macros, such 7 as UINT8_MAX
, INT64_MIN
, and INT32_C()
may be defined already in C++ applications 6 in other ways. To allow the user to decide 5 if they want the macros defined as C99 does, many 4 implementations require that __STDC_LIMIT_MACROS
and __STDC_CONSTANT_MACROS
be defined 3 before stdint.h
is included.
This isn't part of the 2 C++ standard, but it has been adopted by 1 more than one implementation.
The above issue has vanished. C99 is an 4 old standard, so this has been explicitly 3 overruled in the C++11 standard, and as 2 a consequence C11 has removed this rule.
More 1 details there:
In stdint.h
under C++, they control whether to define 2 macros like INT32_MAX
or INT32_C(v)
. See your platform's stdint.h
for 1 additional information.
More Related questions
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.