tags:

views:

85

answers:

2

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();
+1  A: 

It depends on the definition of A - "a class properly defined with constructors etc" is very unhelpful and impressively vague.

Joe Gauterin
+1  A: 

They are the same

pm100
Thanks for your answers.
Most of the time, yes, but check http://stackoverflow.com/questions/620137/do-the-parentheses-after-the-type-name-make-a-difference-with-new
Seth Illgard