Microsoft Visual Studio 2010 是否支持 c99?

Microsoft Visual Studio 2010 是否支持 c99?

问题描述:

我想知道 Microsoft Visual Studio 2010 是否支持 C99.如果没有,我如何使用像 intptr_tuintptr_t 这样的标准类型?

I would like to know if Microsoft Visual Studio 2010 supports C99. If not, how can I use the standard types like intptr_t and uintptr_t?

据我所知,Visual Studio 2010 不支持 C99.要使用 stdint.h 中的类型,您必须使用 typedef.一种跨平台的方式来做到这一点:

As far as I can tell, Visual Studio 2010 does not support C99. To use types from stdint.h, you will have to use a typedef. A cross-platform way to do this would be:

#ifdef _WIN32
typedef signed short int16_t
#else
#include <stdint.h>
#endif

另见这个问题:Visual Studio 是否支持新的 C/C++ 标准?