CLASS TEMPLATE using c++ program

// CLASS TEMPLATE
#include
#include
template
class pair
{
t v1,v2;
public:
pair(t first,t second)
{
v1=first;
v2=second;
}
t getmax()
{
return(v1>v2?v1:v2);
}
};
void main()
{
int a,b;
float c,d;
clrscr();
cout<<"enter two integers";
cin>>a>>b;
cout<<"enter two decimel numbers";
cin>>c>>d;
pairintobj(a,b);
pairflobj(c,d);
cout<<"max integer is:"< cout<<"\n max float is :"< getch();
}

Comments