Home > Back-end >  Simple and basic problems - class
Simple and basic problems - class

Time:10-05

TPrinter * pr=Printer (); And TPrinter * pr=new TPrinter (); What are the differences between

CodePudding user response:

TPrinter * pr=Printer ();
This is called the Printer function returns the default Printer objects

TPrinter * pr=new TPrinter ();
This is to create a TPrinter object and then need to be the necessary initialization, such as multiple printers, choose which a printer to print,
  • Related