Introduction To Templates
Learn about function templates and how we can use them in C++
We'll cover the following
Definition
Templates are the mechanism by which C++ implements the generic concept.
The following example illustrates two non-generic (type-sensitive) functions for multiplying two numbers, x
and y
:
Create a free account to access the full course.
By signing up, you agree to Educative's Terms of Service and Privacy Policy