複数の汎用データ型の定義

#include < iostream >
using namespace std;

template  class myclass
{
    Type1 i;
    Type2 j;
public:
    myclass(Type1 a, Type2 b) { i = a; j = b; }
    void show() { cout << i << ' ' << j << '\n'; }
};

int main()
{
    myclass ob1(10, 0.23);
    myclass ob2('X', "This is a test");
    
    ob1.show();
    ob2.show();
    
    return 0;
}