#include <iostream>
using namespace std;
template<class T>
class data
{
T a;
public:
data(T b)
{
a=b;
}
void show()
{
cout<<"\nThe value of a : "<<a;
}
};
int main() {
data<int> s(16);
data<float> o(25.5);
s.show();
o.show();
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: