C vs C++ What is different?

preview_player
Показать описание
C vs C++ the differences explained simply

If you want to learn C++ I'd recommend this website
Рекомендации по теме
Комментарии
Автор

A lot of people think of C++ as C with classes (which was the original idea), however, if I would be asked about the biggest strengths of C++ over C, I would not bother talking about OOP, it is true that for a while OOP was considered the algorithmic silver bullet, however, now a days, it is only used in the places where it is a good solution. I considere that the main reasons to use C++ over C are constexpr (which let you create code that can be solve at compile time) and templates which allow to create meta-programming without void* (here I would include the entire STL and other template libs out there), that if done wrong, compile time errors will appear (instead of run time errors with void*) and can be optimized at compile time.

fcolecumberri
Автор

You’re partially right, C is not a subset of C++ but C++ is the extension of C.

eng.shh
Автор

1:10 In c you do not cast malloc with intent. It is wrong to cast the return value of malloc and will pull clang warnings.

James-lsk
Автор

Please do not stop creating new videos. Keep adding wisdom and knowledge to this world!

IgorLisx
Автор

I would not say that the "custom" is to use a method like obj.f() instead of f(data), the "custom" is to use whatever makes sense. And a lot of the time, POD with no functionality attached as methods does make sense, and so you'd use a free function. The actual difference is that C doesn't give you a choice, you only have free functions, whereas C++ gives you the choice of using methods or having a POD type that is passed to a free function.

lennymclennington
Автор

40 years programming with C and about 35 with C++ .. in my humble opinion, C is the only language you need.

LabsResearch
Автор

I don't know, I think the key word here is "discouraged". To me all the coverage in C++ seems like (opinions of how you should write) rather than a required (need to write).

I feel like similar videos kind of oversimplify this into facts when a lot of C++ seems optional. Feel free to correct me.

GmanGavin
Автор

smart ptrs were there in c++ even before c++11 called auto_ptr

wastedkafir
Автор

So, this may be off topic but the career center at my college recommended that I added C to my skills section because a course that we went through does use c++. So the resume the worked on with me says c/c++ which if someone like yourself was looking at my resume would just know is incorrect. I’m literally taking this argument to them on Monday and showing them that the recommendation is probably getting people looked over for jobs.

saltygoose
Автор

The video so short... Craving for more info like syntax... Can you make another video about c vs cpp and their syntax difference and similarities? Thanks bruh...❤❤❤

garryalfonso
Автор

C++ is somehow a low level and a high level language at the same time.

But C is a subset of c++, because you could just compile c code with the c++ compiler and it would work perfectly fine, this is not recommended, because the c compiler would make some more specific optimizations, but the program should run as intended.

TheAndiKurz
Автор

I think it's very possible to replace C with C++ everywhere. If you don't need something, just don't use it in C++.

IgorLisx
Автор

Me writing c code and calling it cpp just to watch the world burn down

leshommesdupilly
Автор

You totally forget the most important difference.

fpn
Автор

"C is simple" 😂... c++ harder than c, js harder than rust

skigui