Templates
Templates
Template
It is an approach where generic types are used
as parameters in algorithms so that they work
for a variety of suitable data types and data
structures.
• Generic classes
• Generic functions
Templates
• Class template- For eg. An array class for
multiple data types(int , float etc.).