i'm not even sure this is possible, as you have to specify the size of the second dimension. any clues? thanks.
Printable View
i'm not even sure this is possible, as you have to specify the size of the second dimension. any clues? thanks.
heh? once its allocated it works the same as your previous thread .
BTW...if the question is that closely similar to your previous topic just put it there.
>i'm not even sure this is possible
It sure would be irritating if it weren't possible:
A good way to remember how to declare your function parameters is to look at how the object being passed was declared. In this case "int **name". In the case of a two dimensional array "T name[x][y]". It's much easier that way, you don't have to remember obscure rules.Code:void f ( int **array );
int main()
{
int **a = new int*[5];
for ( int i = 0; i < 5; i++ )
a[i] = new int[5];
f ( a );
}
thanks for the help guys.