====== C - C++ Templates - Template specialization ====== #include template class MyClass { T value1, value2; public: MyClass (T first, T second) { value1=first; value2=second; } T module () {return 0;} }; template <> class MyClass { int value1, value2; public: MyClass (int first, int second) { value1 = first; value2 = second; } int module () { return value1value2; } }; int main () { MyClass myints (100,75); MyClass myfloats (100.0,75.0); cout << myints.module() << '\n'; cout << myfloats.module() << '\n'; return 0; }