are both syntax equal????

Hello everybody
i just want to know that
Are both the syntax equal



int *ptr=new int(10);

and
int *ptr=new int[10];



help would be appreciated..
Last edited on
The former allocates an int initialized to 10, the latter allocates an array of 10 ints.
Topic archived. No new replies allowed.