Generics in C++ 1 - Templates Introduction | Modern Cpp Series

Sdílet
Vložit
  • čas přidán 16. 07. 2022
  • ►Full C++ Series Playlist: • The C++ Programming La...
    ►Find full courses on: courses.mshah.io/
    ►Join as Member to Support the channel: / @mikeshah
    ►Lesson Description: In this lesson I introduce you to templates in C++. Templates are a powerful feature in C++, and they allow us to avoid 'copy and paste' when we need to implement similar functionality on different data types. I'd like you however to think of templates as a tool for helping compilers generate the necessary code that we need. In this lesson we'll do a brief motivation of just one of the types of templates C++ provides, and then revisit some more features of generic programming (i.e. called templates in C++) in future lessons.
    ►CZcams Channel: / mikeshah
    ►Please like and subscribe to help the channel!
  • Věda a technologie

Komentáře • 31

  • @menachemlevi
    @menachemlevi Před 4 měsíci +2

    amazing keep going

  • @vishalrao7010
    @vishalrao7010 Před 7 měsíci +2

    Thankyou sir for being here. Quality education.

    • @MikeShah
      @MikeShah  Před 7 měsíci

      Cheers! You are most welcome!

  • @RealityCheck6969
    @RealityCheck6969 Před 7 měsíci +1

    I just learned this programming feature and it makes total sense. Very good video, thank you.

    • @MikeShah
      @MikeShah  Před 7 měsíci

      Cheers, happy to hear that!

  • @vimalathithand917
    @vimalathithand917 Před 2 měsíci +1

    Thanks a lot for suach a simple and clear explanation!:D

  • @rodolfoc.nascimento6301
    @rodolfoc.nascimento6301 Před rokem +1

    I never learned templates but you teached very well so I could get templates right now tahnk you Mike continue you are an amazing teacher!

    • @MikeShah
      @MikeShah  Před rokem

      Wonderful! You are most welcome!

  • @dhanushs1802
    @dhanushs1802 Před rokem +3

    Very wonderfully explained as always. Thank you.

  • @robertstrickland9722
    @robertstrickland9722 Před rokem

    Yessssss I've been waiting for this one!

  • @GaryChike
    @GaryChike Před rokem

    Hey Mike, I'm enjoying learning C++ and D at the same time with you. And well, I just had to try this out in D. Just learned about D's Implicit Function Template Instantiation (IFTI). Along with 'return type deduction' , it makes templates just a tad more terse :
    auto square(T) (T input)
    {
    return input * input
    }

    • @MikeShah
      @MikeShah  Před rokem +1

      Templates in D much visually easier without having to overload the angles brackets 👍👍

  • @klutch4198
    @klutch4198 Před rokem +1

    This is a game changer!

    • @MikeShah
      @MikeShah  Před rokem +1

      Leveling up our C++ skills 💪

    • @klutch4198
      @klutch4198 Před rokem +1

      @@MikeShah I have a solid use case for this with a couple of my SFML projects!

    • @MikeShah
      @MikeShah  Před rokem

      @@klutch4198 Awesome, looking forward to hearing more! Will be releasing more videos on templates throughout the next few weeks that may help as well.

  • @axorusmt7042
    @axorusmt7042 Před rokem

    Thank you. Will you eventually cover template metaprogramming. I have never understood it

    • @MikeShah
      @MikeShah  Před rokem

      Eventually, yes! :) Probably a bit in the future--the next several lessons will cover the basics of templates, and that'll be the next step to at least have an introduction.

  • @joshbrice5678
    @joshbrice5678 Před rokem

    Great episode, could you please help me, how can I convert glad.c to glad.cpp, thank you Mike, thank you so much! 👍

  • @abirrugal
    @abirrugal Před rokem +1

    The worst tNice tutorialng soone can do after starting is quitting... never give up and the rewards will be greatly appreciated

  • @menachemlevi
    @menachemlevi Před 4 měsíci +2

    i wonder why you have no 1m views maybe try to do like "bro code" take all your video and unite them to one of 4 hours ,hoppe you make a lot of money

    • @MikeShah
      @MikeShah  Před 4 měsíci +1

      Thank you for the kind words! A longer video is coming!

  • @techschool7479
    @techschool7479 Před rokem

    69 replies...