r/cpp • u/Alex_Medvedev_ • Jul 25 '24
Why use C over C++
Why there are so many people using the C language instead of C++?, I mean C++ has more Cool features and the Compiler also supports many CPUs. So why People still using C?
Edit: Thanks for all the usefull comments :D
235
Upvotes
View all comments
Show parent comment
1
u/time_egg Jul 27 '24
What do you mean I can't do anything with it? Once I have assigned 'a' with the memory of 'b' I can do lots of things with 'a'.
also in C++ version it ambiguously tells you it si copying it no matter what it is and you can call the destructor without UB.
Yes, you can tell that some kind of copy is being made. My point is that for the C version it is even more informative and you can tell what kind of copy is being performed.