#include<iostream.h> #include<conio.h> template <class x=""> void fun(X a,X b) { X c; c=a+b; cout<<"The sume of two numbers is :"<<c<<endl; } int main() { fun(1,3); fun(1.1,2.2); fun('a','c'); getch(); return 0; }
template <class X> void fun(X a,X b) ...
#include<iostream.h> #include<conio.h> template <class X> void fun(X a,X b) { X c; c=a+b; cout<<"The sum of two numbers is :"<<c<<endl; } int main() { fun(1,3); fun(1.1,2.2); fun('a','c'); getch(); return 0; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)