class BaseTerminal { public: virtual void PrintLog(const string& message) const = 0; }; class Screen: public BaseTerminal { public: void PrintLog(const string& message) const = 0; }; class Network: public BaseTerminal { public: void PrintLog(const string& message) const = 0; }; void LogPrint(const BaseTerminal &terminal);