Multi-dimension array problem.
suppose I define a 3D array like " int ***dq;"
Then afte allocate memory to i, I can assign values to it:
for(1D){
for(2D){
for(3D){
dq[i][j][k]= values;
}
}
}
If I pass it as arguments of routines, I write :
fun(dq);
...
Then pass & access it in routine :
void fun(int ***dq){
dq[i][j][k];
}
IT IS CORRECT, IT IS NO PROBLEM!
However, why can't I do this to static array? I mean if I define int brr[i][j][k] and pass it to routine
fun2(brr)
Why can't I write like this:
void fun2( int ***brr){
}
It is wrong
How to pass the argument and access in routines?
Thanks a lot!
|