#include<iostream.h>
#include<conio.h>
template <class T>
class demo
{
public:
                demo(T ch)
                                {
                                cout<<"Value = "<<ch<<endl;
                                }
};
void main()
{
                clrscr();
                demo <char> x('A');
                demo <int> y(10);
                demo <double> z(15.13);
                getch();
}

205.PNG

Advertisements