Generic Functions and Templates in c++
This video tutorial introduces you to the concept of generic programming and explains about the generic functions and templates in c++ programming.
You are gonna learn what are generic functions, what are generic types, how to define a generic function, what is the use of template keyword, how to use the generic function or the template function in detail with example.
source code for this tutorial
#include <iostream>
using namespace std;
template <typename myType> void display(myType x){
cout << " you have passes "<< x <<endl;
}
int main()
{
display(10);
display(1.2345);
display("anil shetty rocks");
return 0;
}