The C and C++ programming languages are closely related. C++ grew out of C, as it was designed to be source-and-link compatible with C. Due to this, C code is often developed with C++ IDEs, integrated with C++ code, and compiled in C++ compilers. While most C source code will compile as C++ code without any changes, certain language differences prevent C++ from being a strict superset of C.
| Property | Value |
| dbpprop:abstract
|
- The C and C++ programming languages are closely related. C++ grew out of C, as it was designed to be source-and-link compatible with C. Due to this, C code is often developed with C++ IDEs, integrated with C++ code, and compiled in C++ compilers. While most C source code will compile as C++ code without any changes, certain language differences prevent C++ from being a strict superset of C. 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. This article, however, focuses on differences that cause conforming C code to be ill-formed C++ code, or to be conforming/well-formed in both languages but to behave differently in C and C++. Bjarne Stroustrup, the creator of C++, has suggested that the incompatibilities between C and C++ should be reduced as much as possible in order to maximize inter-operability between the two languages. Others have argued that since C and C++ are two different languages, compatibility between them is useful but not vital according to this camp, efforts to reduce incompatibility should not hinder attempts to improve each language in isolation. The official rationale for the 1999 C standard (C99) "endorse[d] the principle of maintaining the largest common subset" between C and C++ "while maintaining a distinction between them and allowing them to evolve separately," and stated that the authors were "content to let C++ be the big and ambitious language. " Several additions of C99 are not supported in C++ or conflict with C++ features, such as variadic macros, compound literals, variable-length arrays, and native complex-number types. The long long int datatype and restrict qualifier defined in C99 are not included in the current C++ standard, but some compilers such as the GNU Compiler Collection provide them as an extension. The long long datatype along with variadic templates, with which some functionality of variadic macros can be achieved, will be in the next C++ standard, C++0x. On the other hand, C99 has reduced some other incompatibilities by incorporating C++ features such as // comments and mixed declarations and code.
- A C++ a kompatibilitás miatt jelentős részt megőrzött a C nyelvből: szintaxisát, kulcsszavakkal együtt, és a standard könyvtárát.
|
| dbpprop:hasPhotoCollection
| |
| dbpprop:wikiPageUsesTemplate
| |
| dbpprop:wikibooksProperty
|
- C++ Programming
- Programming Languages/Comparisons/C
|
| rdfs:comment
|
- The C and C++ programming languages are closely related. C++ grew out of C, as it was designed to be source-and-link compatible with C. Due to this, C code is often developed with C++ IDEs, integrated with C++ code, and compiled in C++ compilers. While most C source code will compile as C++ code without any changes, certain language differences prevent C++ from being a strict superset of C.
- A C++ a kompatibilitás miatt jelentős részt megőrzött a C nyelvből: szintaxisát, kulcsszavakkal együtt, és a standard könyvtárát.
|
| rdfs:label
|
- Compatibility of C and C++
- C részhalmaz (C++)
|
| owl:sameAs
| |
| skos:subject
| |
| foaf:page
| |