问题
Possible Duplicate:
Visual Studio support for new C / C++ standards?
See the text below from wiki:
The C99 standard includes definitions of several new integer types to enhance the portability of programs[2]. The already available basic integer types were deemed insufficient, because their actual sizes are implementation defined and may vary across different systems. The new types are especially useful in embedded environments where hardware supports usually only several types and that support varies from system to system. All new types are defined in inttypes.h header (cinttypes header in C++) and also are available at stdint.h header (cstdint header in C++). The types can be grouped into the following categories:
My visual studio can not find any of this files:
<cstdint>
<cinttypes>
<stdint.h>
<inttypes.h>
Why?
回答1:
EDIT
Note that starting from Visual Studio 2013, C99 library support has been added to Visual Studio.
The answer below is my old answer before Visual Studio 2013 added support:
MSVC has very poor support for the C language, they do not support anything past C90. Herb Sutter has already publicly stated this in his blog.
<cstdint>
is supported from MSVC2012.
There is a msinttypes project that fills the absence of stdint.h and inttypes.h in Microsoft Visual Studio.
Boost also provides boost/cstdint.hpp if you do not have it.
来源:https://stackoverflow.com/questions/12970293/why-microsoft-visual-studio-cannot-find-stdint-h