• There are many, many differences. - C++ supports class definitions, which combine data and functions into a logical unit. This promotes better designs, more reusable code, and more scalable systems. - C++ supports templates, which allow some generic algorithms to be applied to data types which are not specified in the definition of the template, but only when the template is used. This can make code much more reusable and flexible. There are many other differences as well. Here's an example of something you can do in C++ which does not work in C: cout << "this is some output, here's a number: " << 3; In C, that code looks like this, and can be quite dangerous, because there can be parameter type or order errors which cause it to blow up at runtime: printf("This is some output, here's a number: %d",3);
  • Just lately I've been doing a school project on the differences between C and C++. Seems like quite a popular question. I have also interviewed Bjarne Stroustrup (Creator of C++) on the topic. Here's the best site that I have found on the topic. It goes over just about everything you'd ever need.

Copyright 2020, Wired Ivy, LLC

Answerbag | Terms of Service | Privacy Policy