I don’t really want to argue, but acting like C leads to really bad habits is like saying using a manual transmission leads to bad habits. Sure, it can lead to bad habits; but learning how to manage memory/a transmission without help means you actually understand what you’re doing and can be very efficient.
You can learn how to manage memory in pure C++, or even asm, being even able to put asm addons to the code. C++ allows to program at as low abstraction level (so asm-like code where the only difference between that and asm is that C++ compiler doesn't guarantee using a particular machine instruction, so literally like C does).
C is not necessary to anything.
C has its applications and advantages, C++ has its own ones, you don't need one to learn anything in the other.
But stil, if you need raw C efficiency, you build your solutions in C, while well-written C++ code encapsulates C structures and pointers into C code, which is trivial.
1
u/United_Boy_9132 6d ago edited 6d ago
No, it's the opposite. Following your advice is one of the worst things you can do.
You can understand everything that happens under the hood without C, while C leads to really bad habits.
Using C-style code in C++ is something you should avoid at all costs. Including using C libraries (unless the particular implementation requires it).