my professor said one way for declaration dynamic 2d arrays.
and i never understand this way.like what does y or x in this code.I want a person explain how works this code.if show with a image is better.thanks
Code:
int **a=new int *[m];
int *x=new int[m*n];
int *y=x;
for(int j=0;j<m;j++)
{
a[j]=y;
y+=n;
}
Comment