Today I Studied Using Template IN a class.the Following Is The Code: 1.Header File: Template.h: #include Using Namespace Std; Template Class Cal {Public: Cal () {}
T Calculate (T &, T &, T &, Template.cpp # include #include #include #include "template.h" Using Namespace std; template < Class T> T Cal :: Calculate (T & T1, T & T2) {RETURN T1 T2;} main () {CAL * c = new cal (); int a = 100; int> INT B = 200; COUT << C-> Calculate (A, B) << Endl; return 0;} The last execution result is as follows: