Can anyone tell me what the difference is between:
Display *disp = new Display();
and
Display *disp;
disp = new Display();
1) Instance of GzDisplay is created in 2nd variant, whereas in 1st variant, created instance is of Display type (I assume GzDisplay is subclass of Display, right?); 2) Besides that 1st is shorter, in 2nd disp have undefined value until assigned with new GzDisplay(). 2nd variant gives you a chance to accidentally forget that and insert some code that uses disp before it initialized.