• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Noob Question: What is the difference between C++ and C?

C++ is object oriented and C is not. That's the biggest difference. They're really entirely different languages that share the same syntax and some functions. Yes, C++ is based on C, but it's been changed so much it's not really the same thing anymore... even simple things like memory allocation and writing to stdout are done differently.
 
How come I am seeing C used much more than C++ especially for real time applications?

RT applications have to be very thin. The base C++ libraries are usually larger than the C libs and some of the nice things C++ handles for you automatically that C doesn't can cause unnecessary overhead. RT developers are control freaks with good reason and C is as low as you can go without using ASM and ASM is bad because it binds you to a certain piece of hardware. Also C compilers have been around longer and are more stable, atleast with reguards to C++ and gcc.
 
Object oriented programming via classes is the main difference.

They're really entirely different languages that share the same syntax and some functions.
Actually C is more of a subset of C++. Almost everything you can do in C you can also do in C++ the same way.

How come I am seeing C used much more than C++ especially for real time applications?
Among the other reasons given here, C derivatives have been around since the 1960s which means it's firmly entrenched in the industry. C++ is pretty new in comparison and I believe it's only just been standardised quite recently.
 
Back
Top