Does Microsoft visual studio 2010 support c99?

前端 未结 3 992
無奈伤痛
無奈伤痛 2020-11-30 12:40

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?

3条回答
  •  佛祖请我去吃肉
    2020-11-30 13:09

    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 
    #endif
    

    See also this this question: Visual Studio support for new C / C++ standards?

提交回复
热议问题