Possible Duplicate:
Do the parentheses after the type name make a difference with new?
Assuming A
is a class properly defined with constructors etc., what is the difference between these?
A *ptrA = new A;
A *ptrA = new A();
Possible Duplicate:
Do the parentheses after the type name make a difference with new?
Assuming A
is a class properly defined with constructors etc., what is the difference between these?
A *ptrA = new A;
A *ptrA = new A();
It depends on the definition of A
- "a class properly defined with constructors etc" is very unhelpful and impressively vague.