The claim that C++ is a superset of C is a marketing statements from the 1990s designed to attract the many C developers to C++.
Lots of of gory details about C/C++ differences and similarities
During that period, when I found myself writing a C program, I would occasionally name a variable ‘this’ so any future C++ compile would complain.
Nice, never seen that C book.
Looks like a fairly complete list of examples.
In practice, the problem I see most often is the implicit pointer cast. Implicit casts are an inherent part of C programming, so it actually shows up everywhere. However, C++ culture holds that casts are generally evil, and the language makes it difficult (while preferring C++’s flavor of OO instead). Most of these other issues you don’t often see in real code.
Also, I find it a bit odd to phrase it as C being a subset of C++, instead of saying that C++ is a superset of C. I guess they technically mean the same thing, but saying C is (not) a subset almost implies that C came after C++.
I got these from a couple sources, then someone pointed out this Wikipedia entry which looks more complete.
Yeah, the implicit cast is part of the C philosophy that the programmer knows what they’re doing.
I phrased it that way because that’s how I’ve been hearing the claim, C is a subset.