Consider class hierarchy:
Finally:
class Printer; class LazerPrinter; class InkjetPrinter; class FaxMachine; void print( Printer* pr ) { pr->print( /*params*/ ); }