Stack Using Templates
Stack Using Templates
}
}
};
int main()
{
cout<<"\nstack operation using templates";
cout<<"\nint stack!!";
stack<int>s1;
cout<<"\n float stack!!";
stack<float>s2;
int choice;
while(1)
{
cout<<"\n1..INT\t2..FLOAT\tenter any key to exit!!";
cout<<"\nenter the choice::";
cin>>choice;
switch(choice)
{
case 1:s1.stack_op();
break;
case 2:s2.stack_op();
break;
default:exit(0);
}
}
return 0;
}