Are you not able to use their C++ compiler to get modern features? My understanding is that C++ is a superset and that a C++ compiler is also usually a C compiler. Is this view incorrect for modern implementations?
MSVC is probably pretty close to C99 these days. Designated initializers are C99, for example.
As far as I know, MSVC just implements the C subset of C++.
> enum Foo { A, B, C };
> Foo x = 1;
test.cc:2:9: error: invalid conversion from ‘int’ to ‘Foo’ [-fpermissive]
Foo x = 1;
I prefer not to use explicit casts because 1) using enum types is confusing to me 2) I frequently use values that are not in the enum - most often that's -1 as a way to indicate "missing". 3) I also like to iterate over all values from an enum using a plain for (int i = 0; i < NUM_FOOS; i++) without any fuss.> As far as I know, MSVC just implements the C subset of C++.
There are things that work in MSVC C mode that do not work in C++ mode.
int free;afaik,
int* arr = malloc(sizeof(int));
has never worked in c++.