+ 1
C++
Why is c++ better than c language..?
6 ответов
+ 2
Because it supports object-oriented and generic programming.
Edit: That's the main reason, but it also has more cool features, like smart pointers, references, better dynamic memory allocation, a more extensive standard library, an alternative for syntax etc.
+ 2
@Vlad Serbu
1) I agree that STL is great, just saying it’s hard to use.
2) No, Python is infuriatingly overvalued.
3) I recently read an answer on Quora to when you have to use C and not C++, and times like that do exist. If you are working on something that cannot use pointers at all without crashing, C++ is the wrong option because you will be inclined to use the STL, which almost always uses pointers. They had to use C because it was much easier to avoid accidentally using pointers.
+ 1
There really is no “this language is better than that language”, besides every language being better than Python, but one advantage it has is the Standard Template Library. This contains all of the features of C++ that are a higher level than C, which includes strings. In C, you have to choose between an array of characters or dealing with pointers. It does this with hardly any speed difference.
The problem is that a lot of the STL is very difficult to use and really just adds a new layer of difficulty. You will know what I’m talking about when you someday read the error message, “List iterator non dereferenceable”.
+ 1
@Jacob
1) The STL is good, you just have to study it, you can't pick up and use it.
2) Python is cool af.
3) C++ is better than C in the same way that C++11 is better than C++98. C is obsolete.
0
C is also an generic ...
0
@ALi
I mean generic as in class templates, not as in general-purpose