#include
using namespace std;
template class MyClass {
T a;
public:
MyClass(T i) { a = i; }
};
int main()
{
MyClass o1(10), o2(9);
MyClass o3(7.2);
cout << "Type of o1 is ";
cout << typeid(o1).name() << endl;
cout << "Type of o2 is ";
cout << typeid(o2).name() << endl;
cout << "Type of o3 is ";
cout << typeid(o3).name() << endl;
return 0;
}
Type of o1 is 7MyClassIiE
Type of o2 is 7MyClassIiE
Type of o3 is 7MyClassIdE