//********************************************* //esempio di classi generiche co piu' tipi //generici da notare la definizione dell'oggetto //ob2 con il secondo tipo char* //********************************************* #include using namespace std; template class trial{ type1 a; type2 b; public: trial(type1 c, type2 d){ a=c; b=d; } void show(){ cout<<"type1 ... "< ob1(12,'a'); trial ob2(12.1,"casa mia"); ob1.show(); ob2.show(); return 0; }