3 ms·
A lot of the C99 features like array initialization got sucked into C++11, and since the C "compiler" in MSVC is the C++ compiler, I think you'll probably get m
by xpaulbettsx 15y ago
A lot of the C99 features like array initialization got sucked into C++11, and since the C "compiler" in MSVC is the C++ compiler, I think you'll probably get most of C99 for free.
- cygx 15y agoIf only that were true - however, some of the more interesting C99 and C11 features aren't part of C++11 as there are already C++ specific alternatives. Also, MS doesn't really have a good track record of backporting C++ features to C (mixing code and declarations, anyone?). If you want to write portable C code that works on at least *nix and Windows, either ignore MSVC (GCC works just fine on Windows via MinGW or Cygwin cross-compiler, as does Clang once you get it set up), or restrict yourself to the common subset of C99 and C++98...
- repsilat 15y agoOne thing I'm pretty jealous of is "Designated initialization" in C99: int whitespace[256] = { [' '] = 1, ['\t'] = 1, ['\h'] = 1, ['\f'] = 1, ['\n'] = 1, ['\r'] = 1 }; Very cool.