Because C++ supports OOP, and OOP programs are better
organized than procedural programs.
C++ does support various programming paradigms better than C.
For example it is more convenient to follow OOP with C++. That
does not turn programs written in C into "procedural programs"
and programs written in C++ into "OOP programs".
I myself like OOP, but it is not such a clear silver bullet.
Some, (like the original architect of STL, Alexander Stepanov)
have been always rather strongly critical against OOP.
In C++, one can extend the meaning of operators, such as �+�
or �<<� for new types without the need to modify existing
code. This means that C++ suppors the open-closed principle.
Most programs in the world use modules written in C. Often as
closed source modules. C supports that principle well enough.
C++ modules often enwrap themselves under C interface to
break loose and to be independent and still useful.
One can use natural wordings such as �m + m1� for the
addition of two matrices, which is impossible in C. So, C++
programs are easier to read and to maintain, which is the
actual goal of all attempts at being �organized�.
Operator overloading is syntax sugar. It can make things
easier to read. Everybody have had that fun "to read
and to maintain" the classical problem of default copy
assignment operator not doing deep copy. My favorite
wtf of C++ of all times was also that operator, in that
code:
x = x;
The line was written to break the mutexes open in that
object 'x'.
In C, one has to call �sinh� for the hyperbolic sine ofa
double, but �sinhf� for the hyperbolic sine of a float,and
�sinhl� for the hyperbolic sine of a long double. Now, what
kind of language is this?
'sinhl' is perfectly expressive name to indicate that floating point
is not for kids. Rudimentary support, if you are capable then make
the tools you need, otherwise run. It is same for both C and C++.
Every aspect of the floating point types is "implementation-defined".
Some aspects can be modified dynamically runtime with some functions
like 'clearfp' and 'controlfp'. Lot of fun.