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
?
By default, Microsoft's Visual Studio C Compiler doesn't follow the C99 standard. If you're using Visual Studio, you can make the transition process to Unix for the Lab Assignments easier by performing the following steps.
Visual Studio 2010 - Microsoft Lifecycle | Microsoft Learn. This browser is no longer supported. Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Support for C11 and C17 standards is available in Visual Studio 2019 version 16.8 and later.
Visual Studio 2010 does not support C99 syntax. stdint.h
is a very common file in all C/C++ compilers, though, which does exist in a Visual C++ 10.0 installation, included with the Windows SDK (regardless of the version of Visual Studio that you use).
stdint.h can be found in:
This file does provide a typedef for intptr_t
. Feel free to use it in any C or C++ project you like.
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
See also this this question: Visual Studio support for new C / C++ standards?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With