Module 08 - Marymota/CPP_Modules GitHub Wiki

ex00

Function template

Templates are a feature of C++ that allow the creation of single functions that can work with different data types.

template <typename T>
T functionName(T parameter1, T parameter2, ...) { // code }

T is a template argument that accepts different types.

Standard Containers

A container is a holder object that stores a collection of other objects (its elements). They are implemented as class templates, which allows a great flexibility in the types supported as elements.

STL - Standard Template Library

References:

Function Template Containers

⚠️ **GitHub.com Fallback** ⚠️