|
Almost. C++ is as close as possible to compatible with C, but no closer. In practice, the major difference is that C++ requires prototypes, and that f() declares a function that takes no parameters (in C, f() is the same as f(...)). There are some very subtle differences as well, like sizeof('x') is equal to sizeof(char) in C++ but is equal to sizeof(int) in C. Also, C++ puts structure "tags" in the same namespace as other names, whereas C requires an explicit struct (e.g., the typedef struct Fred Fred; technique still works, but is redundant in C++).
more
|
Is C++ backward compatible with ANSI/ISO-C?
Related Questions
- Almost. C++ is as close as possible to compatible with C, but no closer.
- OK, I'll give you a nudge away from the wrong direction. There are no backward messages on the phone ...
- See the SET TERMINAL/BACKSPACE command on OpenVMS V8.2 and later. This behaviour involves the Motif virtual ...
- See the SET TERMINAL/BACKSPACE command on OpenVMS V8.2 and later. This behaviour involves the Motif virtual ...
- Many people notice that the spinning rims of a car shown in a commercial or film appear to spin backwards ...