From 99d15752be2db8ca8260c9931dd679629292af8f Mon Sep 17 00:00:00 2001 From: nagrat Date: Tue, 14 Mar 2023 19:57:05 +0000 Subject: [PATCH] Added another comment for templates --- Functions/templates.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Functions/templates.cpp b/Functions/templates.cpp index 942a0f0..b778dd0 100644 --- a/Functions/templates.cpp +++ b/Functions/templates.cpp @@ -7,6 +7,7 @@ using namespace std; */ template T add(T &x, T &y) { // template to make a function to add numbers + // the T means type meaning that the values of the parameters can be any data-type // &x, &y are references to values that can be anything -> float, int, long, double etc T result = x + y; // makes a return variable from the T class part; can be anything // -> is now dynamically typed as it will find itself on runtime not beforehand