int ***darray; (darray[x][y][z] )
I want to allocate the memory for the last dimension in a while loop., i.e. z is incremented for each iteration of the loop. The number of iterations are unknown apriori.
i have allocated memory for the first 2 dimensions as below
darray = calloc (x, sizeof(int**));
for ( i=0; i< x; i++)
darray[i] = calloc (y, sizeof(int*) );
I'm having trouble allocating darray[i][j][k]
element
i want to perform
`for ( i= 0; i< x; i++)
{
for ( j=0; j< y; j++)
{
Break= TRUE;
k=0;
while ( Break )
{
darray[i][j][k] = VarX;
if ( VarX > 10 )
Break = FALSE;
k++;
}
}
}
`