Microsoft Visual Studio 2010 是否支持 c99? [英] Does Microsoft visual studio 2010 support c99?

查看:48
本文介绍了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++ 标准?

这篇关于Microsoft Visual Studio 2010 是否支持 c99?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆