C++ Templates and Generics Functions

Subscribers:
50,600
Published on ● Video Link: https://www.youtube.com/watch?v=8IgXzTNgQdo



Duration: 8:44
404 views
20


Generics and Templates in C++. In this video you will learn how to create templates so that your functions can work for any type, hence the term generic. Two examples where we would want to create a generic function would be if we were swapping two variables or iterating and printing out the values of a vector. In both cases, there is no need to specify a type so we can just use a template to create a generic type name.

If you need to review these topics:
Functions: https://youtu.be/65PSQUdH5k0
Pass by Value vs Reference: https://youtu.be/77XcoXwoK2c
Function Overloading: https://youtu.be/tJPHWF1PboY
Const Reference: https://youtu.be/aP_VwBrPrJw

C++ Playlist:
https://www.youtube.com/playlist?list=PLnKe36F30Y4ZDNIOZ51sX25pWKQ1pkpTE

Install C++ with VS Code:
https://youtu.be/DMWD7wfhgNY

Subscribe for more coding tutorials 😄!







Tags:
C++ functions
functions C++
functions in C++
function templates C++
function templates in C++
C++ function templates
C++ generics
generics C++
generics in C++
generic functions C++
generic functions in C++
C++ functions and templates
C++ templates and functions
C++ function template
function template C++
function c++
c++ functions
functions c++
functions in c++
generics c++
function templates c++
templates c++
function template c++