Navigation

What's the difference between C and C++?


New programmers often treat C and C++ as very similar languages, even abbreviating the two to C/C++. And while this is sort-of true in one direction -- C++ is based on C so most of the time, valid C programs are also valid C++ programs, it's not true at all in the other direction. C++ is light-years ahead of C in terms of language functionality (templatesclasses, and the standard library being major examples). 
In addition to the major differences, there are also smaller differences at the language level--everything from different input and output routines, to differences in memory allocation (C++ uses new and delete while C uses malloc and free).
If you want to learn about some of these detailed differences between C and C++,check out

No comments:

Post a Comment