Generics in C++ 1 - Templates Introduction | Modern Cpp Series
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
amazing keep going
Cheers!
Thankyou sir for being here. Quality education.
Cheers! You are most welcome!
I just learned this programming feature and it makes total sense. Very good video, thank you.
Cheers, happy to hear that!
Thanks a lot for suach a simple and clear explanation!:D
Cheers!
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!
Wonderful! You are most welcome!
Very wonderfully explained as always. Thank you.
Cheers!
Yessssss I've been waiting for this one!
And more to come :)
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
}
Templates in D much visually easier without having to overload the angles brackets 👍👍
This is a game changer!
Leveling up our C++ skills 💪
@@MikeShah I have a solid use case for this with a couple of my SFML projects!
@@klutch4198 Awesome, looking forward to hearing more! Will be releasing more videos on templates throughout the next few weeks that may help as well.
Thank you. Will you eventually cover template metaprogramming. I have never understood it
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.
Great episode, could you please help me, how can I convert glad.c to glad.cpp, thank you Mike, thank you so much! 👍
Nothing special, just rename the extension
@@MikeShah Thanks 🙏
The worst tNice tutorialng soone can do after starting is quitting... never give up and the rewards will be greatly appreciated
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
Thank you for the kind words! A longer video is coming!
69 replies...