#include <iostream> using namespace std; template <typename T> class Printer { public: void print(T value) { cout << value << endl; } }; template <> class Printer<char*> { public: void print(char* value) { cout << "String: " << value << endl; } }; int main() { Printer<int> intPrinter; Printer<char*> stringPrinter; intPrinter.print(42); stringPrinter.print("Hello, World!"); return 0; }