Regarding double pointer

how the double pointer will work here i am not able to understand why to take double pointer here

Hey @ssmit_joshi

pls read this article ->https://www.techiedelight.com/dynamic-memory-allocation-in-c-for-2d-3d-array/
it u still face any doubt after reading then feel free to ask here

ya but here if we take one pointer then it will point to new array we are making but if we take double pointer then the where the other pointer will point ?

Bro think of it like this
int * arr =new int [m];

here we are creating an array of integers

int* *arr=new int*[m]

Here we are creating array of int* so
and then at those address we will allocate array of integers

for(int i=0;i<m;i++)arr[i]=new int[n];

This diagram depicts the above