What is the difference between these two methods of dynamic allocation of arrays?

  array-pointer, arrays, c++, pointers

I was going through array using pointers and I found two different dynamic allocation methods of an array

int *ptr_arr=new int[10];

This one was defined in the lectures but when I explored a bit I found a slightly different method:

int **ptr_arr=new *int[10];

Can someone please explain what’s the difference between them?

Source: Windows Questions C++

LEAVE A COMMENT