Well that is IMHO a misunderstanding. One can make a C or C++ program work that it either can be compiled as C or C++ code but that fails which such simple things as different keywors
int main(void)
int new = 0;
return 0;
}
Is quite ok in C but hardly in C++. Unfortunatly the impression is still that C++ is "just" a "better" C (whatever "better" means, but the languages are different.
Regards
Friedrich
Main Topics
Browse All Topics





by: josgoodPosted on 2007-09-15 at 06:07:07ID: 19897389
Because C++ includes (almost) all of C.
C++ can be thought of as having 3 sections -- a C section, an object-oriented section (classes), and a templates section.
There are a few differences, but generally you can compile a C program with a C++ compiler.