Visual Studio 2005中的在哪里?

时间:2020-11-26 16:06:03

I'd like to use the C99 header file inttypes.h in a Visual Studio project (I'd like to printf 64 bit numbers).

我想在Visual Studio项目中使用C99头文件inttypes.h(我想打印64位数字)。

However, this file does not seem to exist in my install.

但是,我的安装中似乎不存在此文件。

Is this just not part of VS2005? Are there any alternatives?

这不是VS2005的一部分吗?还有其他选择吗?

4 个解决方案

#1


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

它在谷歌。 VS没有

#2


No, it is not included in VS 2005.

不,它不包含在VS 2005中。

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

另一种选择是Boost在Boost :: Integer库中的实现,特别是boost / cstdint.hpp

#3


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.

对于Visual Studio 2005,请参阅http://connect.microsoft.com/VisualStudio/feedback/details/99133/c99-header-inttypes-h-missing#details中的错误“C99 header missing” Microsoft不打算将该文件添加到Visual Studio 2005。

It seems to me that inttypes.h is missing also from Visual Studio 2010.

在我看来,Visual Studio 2010中也缺少inttypes.h。

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 Studio 2012中的C ++标头 ,请参阅https://connect.microsoft.com/VisualStudio/feedback/details上的“C ++ 11标头丢失(Microsoft Visual Studio Ultimate 2012 RC 11.0.50522.1)”。 / 748766 / C-11-报头cinttypes-是缺失-微软视觉工作室最终-2012-RC-11-0-50522-1

#4


Visual C++ does define its own sized types:

Visual C ++确实定义了自己的大小类型:

__int8
__int16
__int32
__int64

#1


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

它在谷歌。 VS没有

#2


No, it is not included in VS 2005.

不,它不包含在VS 2005中。

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

另一种选择是Boost在Boost :: Integer库中的实现,特别是boost / cstdint.hpp

#3


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.

对于Visual Studio 2005,请参阅http://connect.microsoft.com/VisualStudio/feedback/details/99133/c99-header-inttypes-h-missing#details中的错误“C99 header missing” Microsoft不打算将该文件添加到Visual Studio 2005。

It seems to me that inttypes.h is missing also from Visual Studio 2010.

在我看来,Visual Studio 2010中也缺少inttypes.h。

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 Studio 2012中的C ++标头 ,请参阅https://connect.microsoft.com/VisualStudio/feedback/details上的“C ++ 11标头丢失(Microsoft Visual Studio Ultimate 2012 RC 11.0.50522.1)”。 / 748766 / C-11-报头cinttypes-是缺失-微软视觉工作室最终-2012-RC-11-0-50522-1

#4


Visual C++ does define its own sized types:

Visual C ++确实定义了自己的大小类型:

__int8
__int16
__int32
__int64