There is no such thing as C/C++, and yet we see this phrase both in resumes and in job posts. While it's true that C and C++ share some similarities, they are not interchangeable and should not be treated as such.
Historically speaking, C++ started as âC with classesâ. The first C++ compiler Cfront, converted C++ to C, but that was a long time ago. Over time, C and C++ evolved separately and are now defined by separate language standards. C has maintained its simplicity, while C++ has become a modern language that enables abstract solutions for problems without sacrificing performance levels.
As C++ was inspired by C, it supports much of Câs syntax and semantics. However, itâs not an exact superset of C, which means that not all valid C code is valid C++ code, and sometimes code that can be compiled by both C and C++ compilers will give you different results. These differences are rare and quite specific, but they are important to be aware of, especially for those transitioning from C to C++.
These instances where the same source code has a different result if compiled with C or C++ code are summed up in a document âC xor C++ Programmingâ by Aaron Ballman, a member of both WG14(C) and WG21(C++) standardization groups. Link in the comments.
#programming #cpp #firmware
Historically speaking, C++ started as âC with classesâ. The first C++ compiler Cfront, converted C++ to C, but that was a long time ago. Over time, C and C++ evolved separately and are now defined by separate language standards. C has maintained its simplicity, while C++ has become a modern language that enables abstract solutions for problems without sacrificing performance levels.
As C++ was inspired by C, it supports much of Câs syntax and semantics. However, itâs not an exact superset of C, which means that not all valid C code is valid C++ code, and sometimes code that can be compiled by both C and C++ compilers will give you different results. These differences are rare and quite specific, but they are important to be aware of, especially for those transitioning from C to C++.
These instances where the same source code has a different result if compiled with C or C++ code are summed up in a document âC xor C++ Programmingâ by Aaron Ballman, a member of both WG14(C) and WG21(C++) standardization groups. Link in the comments.
#programming #cpp #firmware