greathope123
Programmer
Hi,
I am playing pointer array but do not understand what is going on.
This pointer array *d[] looks correct:
int a1[2],b1[3];
int *d[]={a1,b1};
d[0][1]=1; d[1][2]=2;
cout<<d[0][1]<<", "<<d[1][2]<<endl;
Why this pointer array **d[] is not correct:
int a2[1][2],b2[3][4];
int **d[]={a2,b2};
I will be appreciated for any help!
I am playing pointer array but do not understand what is going on.
This pointer array *d[] looks correct:
int a1[2],b1[3];
int *d[]={a1,b1};
d[0][1]=1; d[1][2]=2;
cout<<d[0][1]<<", "<<d[1][2]<<endl;
Why this pointer array **d[] is not correct:
int a2[1][2],b2[3][4];
int **d[]={a2,b2};
I will be appreciated for any help!