4 ms·
On Windows one compiles C99 code as C++, that's all.
by PieterH 10y ago
On Windows one compiles C99 code as C++, that's all.
- david-given 10y agoC99 and C++ aren't compatible, unfortunately. For example, C99 designated initialisers aren't in C++ at all, which is a shame as they're fantastically useful: struct foo { int i; double j; }; struct foo f = { .j=9.1, i=4 }; See http://stackoverflow.com/questions/18731707/why-does-c11-not-support-designated-initializer-list-as-c99 http://stackoverflow.com/questions/18731707/why-does-c11-not....
- xvilka 10y agoSince VS2015 MSVC should have most of C99 support already. So there are no reasons to avoid C99 usage nowadays at all.
- xvilka 10y agoMoreover, now you can install just compiler/build tools without Visual Studio: https://blogs.msdn.microsoft.com/vcblog/2016/03/31/announcing-the-official-release-of-the-visual-c-build-tools-2015/ https://blogs.msdn.microsoft.com/vcblog/2016/03/31/announcin...
- pjmlp 10y agoVS2015 MSVC supports C++14, which requires C99 library support, hence why Microsoft updated the support. Likewise MSVC will support C11 libraries when they get around to be fully C++17 compliant. For any newer C standard the official Microsoft position is to use clang with the Visual C++ backend, called C2 which Microsoft is turning into a backend to be shared between clang, Visual C++ and .NET Native.