cpp ? only difference between c and cpp is objects and classes ?
Nope, don't ever make that assumption. C and C++ are different languages. This for instance is valid in C, but not in C++: int a[4] = { [3] = 5, [1] = 2 }; 👆 will work in C but fail to compile in C++ a will be [0, 2, 0, 5] C++ tries to be compatible with C but not completely.
welp those are designated initializers.
C isn't obligated to zero-initialize anything here I assume?
Weird inconsistency
Обсуждают сегодня