I think you're missing the point. The C code is about 20 lines of code whilst C++ uses just two standard library calls. I work a lot with C and I get really really tired of having to reinvent the wheel time and again, and wish very hard that I could just use C++ containers and algorithms.Right so the C++ example is compressed in the link given, compared to C which is nicely spaced out?
Show me stuff with overloads et al. Then verbosity goes through the roof.
Anyway, I'm not here to argue against using a language, I was just vilifying C++ and Objective C as a bit of a joke.
Are you sure that you mean overloading? You're not confusing overloading and overriding? My experience with overloading is, yet again, that the result is _shorter_ code. As an example a few years ago I worked on a C code generator. One of the types used an array which would be used in general expressions. This resulted in code like
d = abc_add(abc_mul(a, b), c);
In C++ this would have been the "through the roof verbosity"
d = a*b+c;
Perhaps you mean the wonderful C overloading where all pointers can be converted to void*. This is a bit of a joke in terms of type safety, but it can result in shorter and more efficient code.
Finally C++ can do virtually everything that C can, so at the 'worst' you could compile C code with a C++ compiler and benefit from better type checking.