C standards are not backward compatible - code written under the latest standard is not guaranteed to build with compilers that only support earlier versions.
However, C is not a subset of C++, and nontrivial C programs will not compile as C++ code without modification. Likewise, C++ introduces many features that are not available in C and in practice almost all code written in C++ is not conforming C code.
If you know C++98/03, essentially all your code will continue to work unchanged because C++11 is nearly perfectly backward-compatible with the previous standard.
C++ is not fully backward compatible with C, wherever it's needed it has drawn a line. e.g. Show activity on this post.
If I import the std.c libaries instead of including the libraries in C, would C code compile with a D compiler, or are there other backwords compatibility issues?
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