C vs C++ | Which Should you Learn?

Поділитися
Вставка
  • Опубліковано 26 бер 2023
  • Start your software dev career - calcur.tech/dev-fundamentals Be notified of new C/C++ course: calcur.tech/c-cpp-newsletter
    💯 FREE Courses (100+ hours) - calcur.tech/all-in-ones
    ⚛️ FREE React Course (20 hours) - calcur.tech/free-react-course
    ✅ Data Structures & Algorithms - calcur.tech/dsa-youtube
    ~~~~~~~~~~~~~~~ CONNECT ~~~~~~~~~~~~~~~
    ✉️ Newsletter - calcur.tech/newsletter
    📸 Instagram - / calebcurry
    🐦 Twitter - / calebcurry
    🔗 LinkedIn - / calebcurry
    ▶️ Subscribe - calcur.tech/subscribe
    👨🏻‍🎓 Courses - www.codebreakthrough.com
    ~~~~~~~~~~~~~~ SUPPORT ME ~~~~~~~~~~~~~~
    ↪ My Amazon Store - www.amazon.com/shop/calebcurry
    🅿 Patreon - calcur.tech/patreon-calebcurry
    🅖 GitHub Sponsors - github.com/sponsors/CalebCurry
    Ⓟ Paypal - paypal.me/calcur
  • Наука та технологія

КОМЕНТАРІ • 73

  • @codebreakthrough
    @codebreakthrough  Рік тому +8

    Which do you prefer? C or C++?
    If you want to join my newsletter to get new C++ content and updates on courses, join here:
    calcur.tech/c-cpp-newsletter

  • @zemlidrakona2915
    @zemlidrakona2915 10 місяців тому +58

    As someone who leaned C in 1983 and C++ a few years later, I'm going to suggest you lean C first and then migrate to C++. This advice is often rejected by teachers. The usual excuse is that newer programmers don't need to learn all the lower level stuff. However C++ was not designed up front with the standard library and sooner or later you will have to dig down into the core of the language, if you really want to get the most out of it. I've seen A LOT of new C++ programmers that get overwhelmed by the language trying to learn everything all at once. Some never really figure out how it all works. Trust me, learn C first, then add on classes, templates, and then the standard library. If you do it that way you will wrap your head around everything much easier. Except for some corner cases C++ is backwards compatible with C, so you lose nothing by learning C first.

    • @geekypicky810
      @geekypicky810 8 місяців тому +9

      I've seen some ppl in comments saying they lost their Time learning C and that they should've learned C++ before. I was about to start C++ but what you described "some never figure out how it all works"
      That's me in everything😂
      So I'm gonna go with your advice and learn C first, thank you

    • @achura6129
      @achura6129 8 місяців тому +7

      this comment actually helped me a lot bcs my university is starting with C. I didn't want to lose time with C but my teachers said learning it will help me when I'm learning C++ next year. I wasn't sure about it untill i see this comment cuz every single mf i talked said don't even lose time with C go with C++ but they were not as experienced as you are. thank you, now i can study peacfully. btw sorry for my bad english

    • @GmanGavin1
      @GmanGavin1 6 місяців тому

      But most of the libraries I want to use are C++. Skia / PDFHummus / DirectX. I've already written some C++ OpenGL because all the educational resources are in C++. I tried to avoid C++ and use C but all the resources out there pushed me into C++.

  • @grimvian
    @grimvian Рік тому +19

    I'm a hobby programmer and retired. I love to to code and I'm also a Dane, so of course I had to learn C++. My wife needed a kind of CRM and I thought I could learn C++, while writing a relation database. It took about 6 months, before my wife stopped to demand features and got rid of known errors. The quality of the code in the beginning and in the end is very different, but I survived. :o)
    After a while, I decided to to the big rewrite and about 5000 lines later I found myself writing more and more C like code, but had the job finished.
    It's much more intuitive for me to use printf, time instead of cout or chrono with a "million" scope resolution operators.
    But I don't need a job and I'm coding for fun and spend my time on logic instead of trying to understand awkward error messages and a endless language.

  • @VictorRodriguez-zp2do
    @VictorRodriguez-zp2do Рік тому +25

    You probably want to learn C first then C++. Since C is simpler and doesn't have all the C++ nonsense you will have an easier time learning it, probably best to learn C until you are somewhat used to memory management and then C++.

    • @xxfreedomxx9479
      @xxfreedomxx9479 11 місяців тому +2

      C++ is easier for me since in c there are stupid %n,&n after using scanf

    • @rul1175
      @rul1175 7 місяців тому

      What is hard about that. 4 hours in C++ and I waz like wtf is all thos comvuluded mess.

    • @elfpimp1
      @elfpimp1 5 днів тому

      I agree with Victor. If you're not used to being restricted by resources, you can C++ your way into bloat.

  • @DevlogBill
    @DevlogBill Рік тому +9

    Caleb, I notice you give pretty good advice. One piece of advice which actually worked out for me was Django. You created a video stating if you want to create a website you can jump right into learning Django and learn Python along the way and you were right. I took your advice and learned Python along the way. Great video.

  • @frankcastellanos
    @frankcastellanos 7 місяців тому

    Thanks for the info brother, always awesome advice

  • @reezuleanu1676
    @reezuleanu1676 6 місяців тому +1

    This is the first video of yours that i see, i barely dabbled in c and used c++ once for a robotics class in college, yet you explained the differences in a way that even i understood everything. Thank you, i believe your channel will keep me occupied for the foreseeable future

  • @Alex.Shalda
    @Alex.Shalda Рік тому +1

    More videos! I watched your C tutorial and liked it a lot!!!

  • @programinc7581
    @programinc7581 Рік тому

    Thank you Caleb 😊

  • @Job11yt
    @Job11yt Рік тому

    Great vid, I do miss the part where you explain the cost of all those features like str classes instead of char arrays. E.g. are there perfomance differences?

  • @davaughnwilliams5100
    @davaughnwilliams5100 Рік тому

    Nice video caleb 💥

  • @deepakagarwal1990
    @deepakagarwal1990 11 місяців тому

    What about the performance and speed in terms of C vs C++

  • @coleblender
    @coleblender 8 місяців тому +1

    What do you think his favorite color is?

  • @speedytruck
    @speedytruck Рік тому +6

    Real chads use the GNU dialect of C to shoehorn object oriented programing in C!

  • @staticage6
    @staticage6 Рік тому +1

    Can't go wrong with either one of them

  • @Ahmed_Bytes
    @Ahmed_Bytes Рік тому

    Finally, it's been a while

  • @TheBuilder
    @TheBuilder Рік тому +4

    You should mention the more modern features like constexpr, concepts, ranges, attributes, views, the algorithms library

    • @developerdeveloper67
      @developerdeveloper67 Рік тому

      Those are all useless features.

    • @TheBuilder
      @TheBuilder Рік тому +1

      @@developerdeveloper67 the algorithms library is the #1 reason C++ is picked for competitive programming

    • @zytr0x108
      @zytr0x108 Рік тому

      Constexpr is in C23

  • @mdshahinur2786
    @mdshahinur2786 Рік тому

    Nice❤

  • @knofi7052
    @knofi7052 Рік тому +6

    I would say if you want to learn programming learn C and if you want to learn a complex programming language learn C++.😉

    • @computernerd8157
      @computernerd8157 Місяць тому +1

      Lol C++ is not that complex. C is more complex when you build a game. How do you deal with unkown types is C? You have to build a function for every possible type but in C++ , you can use a template.

    • @hellothere-cx8dz
      @hellothere-cx8dz 25 днів тому

      @@computernerd8157you can only use templates if types are known at compile time. Even if types are known at compile time, it is arguably much more complicated to learn the ins and out of c++ template metaprogramming than to copy and paste lines of code and maybe change the types here and there.

  • @miguelalbertooxa8699
    @miguelalbertooxa8699 Рік тому +3

    I would suggest a CMake course

  • @gurudaki
    @gurudaki Рік тому

    C++ or C# do you suggest?

  • @sturlamolden
    @sturlamolden 10 місяців тому +6

    I disagree with this.
    First, looking at the TIOBE ranking it is clear that C++ is used a lot less than C. Java, C and Python are the high-ranking languages. C++ is way down the line.
    Second, you cannot get a job as a C++ developer by “learning“ C++. This is because learning C++ at a professional level takes at least 10 years, maybe 15. Recruiters know this. That is why there are more job openings for C++ developers. There are very few that can actually use it at a level required in the industry, and so jobs stay vacant. So you will not get any of these jobs unless you have tons of experience with it.
    As for object orientation: If you think you need this, you are better off using Java anyway. That is why C++ is dying. All the momentum behind it is gone. C is still going strong.

    • @Cultosaurus_Erectus
      @Cultosaurus_Erectus 4 місяці тому +1

      ??????????????????????

    • @hellothere-cx8dz
      @hellothere-cx8dz 25 днів тому +1

      From what I hear, C is only useful for embedded programming where efficiency is very important as resources are limited. Apart from this, any modern computer can easily deal with the (very) small overhead of c++ features without any problems,and yet allows for abstractions that increase readability and speed of programming, all with very small performance costs. I can imagine that this is mainly why most graphic ínstense games use unreal engine, which is based on c++, and not c.

  • @oglothenerd
    @oglothenerd Рік тому +1

    You should let Odysee sync your vids! Odysee is another video platform.

  • @pamelagueke9811
    @pamelagueke9811 Рік тому

    C++

  • @TomMwendwa-ti1lx
    @TomMwendwa-ti1lx Рік тому

    Tag me

  • @Favourite296
    @Favourite296 Рік тому

    I am watching this video from India, this is my favorite channel 😍

  • @jljovano
    @jljovano Рік тому +2

    Rust ? ;)

  • @hiongun
    @hiongun Рік тому +1

    it's 21st century. learn Zig, a modern C successor.

  • @nieczerwony
    @nieczerwony Рік тому

    Learn machine code and microcode.😅

  • @Markdim7
    @Markdim7 Рік тому +3

    Should we even bother with coding after chat gpt 4

  • @TomMwendwa-ti1lx
    @TomMwendwa-ti1lx Рік тому

    An the first to view

  • @johnychinese
    @johnychinese Рік тому +5

    Learn CHADStack, you'll be a total CHAD

  • @arielsuarez5471
    @arielsuarez5471 11 місяців тому +1

    So C++ it is. I suppose I can learn C afterwards.

    • @makara2711
      @makara2711 9 місяців тому

      The most brilliant, most influential, and smartest computer scientists (Ken Thompson, Dennis Ritchie, Linus Torvalds) DISLIKE C++

    • @arielsuarez5471
      @arielsuarez5471 9 місяців тому

      @@makara2711 that’s just too bad. I haven’t gone far with C++. Not that it’s very hard for me to learn since I have already coded in Java. However, Python seems to be more popular for AI and Data Science.

    • @tommyliu7020
      @tommyliu7020 3 місяці тому

      @@makara2711I mean everyone has their own personal preferences.

  • @carborundum72
    @carborundum72 Рік тому +6

    Neither. Learn Rust. ;)

    • @thebean529
      @thebean529 Рік тому +6

      And have no job

    • @mohithvj8353
      @mohithvj8353 Рік тому

      💀

    • @Seacrest.
      @Seacrest. Рік тому

      yep yep yep Rust Rust Rust Only Rust

    • @g3n3r1c6
      @g3n3r1c6 Рік тому +1

      You gotta love how it took me 10 seconds to find this lol. I'm one of like 3 people who doesn't like Rust that much. I also like being employed

    • @oglothenerd
      @oglothenerd Рік тому +7

      Learn both and Rust.