Where is <inttypes.h> in Visual Studio 2005?

落爺英雄遲暮 提交于 2019-11-28 13:21:59

It's at google. VS doesn't come with <inttypes.h>

No, it is not included in VS 2005.

An alternative is Boost's implementation in the Boost::Integer library, specifically boost/cstdint.hpp

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-1

Visual C++ does define its own sized types:

__int8
__int16
__int32
__int64
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!