I'd like to use the C99 header file inttypes.h in a Visual Studio project (I'd like to printf 64 bit numbers).
However, this file does not seem to exist in my install.
Is this just not part of VS2005? Are there any alternatives?
I'd like to use the C99 header file inttypes.h in a Visual Studio project (I'd like to printf 64 bit numbers).
However, this file does not seem to exist in my install.
Is this just not part of VS2005? Are there any alternatives?
Visual C++ does define its own sized types:
It's at google. VS doesn't come with
<inttypes.h>
For Visual Studio 2005 see the bug "C99 header
<inttypes.h>
missing" at http://connect.microsoft.com/VisualStudio/feedback/details/99133/c99-header-inttypes-h-missing#details where it seems Microsoft did not plan to add the file to Visual Studio 2005.It seems to me that
inttypes.h
is missing also from Visual Studio 2010.For the C++ header
<cinttypes>
in Visual Studio 2012 see the bug "C++11 header is missing (Microsoft Visual Studio Ultimate 2012 RC 11.0.50522.1)" at https://connect.microsoft.com/VisualStudio/feedback/details/748766/c-11-header-cinttypes-is-missing-microsoft-visual-studio-ultimate-2012-rc-11-0-50522-1No, it is not included in VS 2005.
An alternative is Boost's implementation in the Boost::Integer library, specifically boost/cstdint.hpp