3 ms·
While the C++ language is indeed a superset of the C language, the paradigms of modern C++ have almost no overlap with those of C. See for example the string qs
by ordinary 12y ago
While the C++ language is indeed a superset of the C language, the paradigms of modern C++ have almost no overlap with those of C. See for example the string qsort vs string std::sort elsewhere in this thread.
The myth in "To understand C++, you must first learn C" is not that C and C++ are unrelated. The myth is that learning C helps you understand C++. The reality is that telling people to learn C first is an excellent way of getting them to write really bad C++ when they switch over to C++11.
- ygra 12y agoI'd argue that UB is an evil enough concept in C that still exists and is expanded on in C++ that should be known by every programmer. Sure, paradigm differences mean that idiomatic C code is not idiomatic C++ code, but knowing the pitfalls of the language should be mandatory, imho.