the array declared is :
Code:
int ***array2;
array2 = (int ***)malloc(sizeof(int **) * iter);
for (i = 0 ; i < iter; i++) {
array2[i] = (int **)malloc(sizeof(int *) * nodes);
for (j = 0; j < nodes; j++) {
array2[i][j] = (int *)malloc(sizeof(int) * nodes)
for (k = 0; k < nodes; k++)
array2[i][j][k] = i * j * k;
for (i=0; i<iter; i++){
for (j=0; j<nodes; j++){
for (k=0; k<nodes; k++){
array2[i][j][k] = array1[j][k]; (//array 1 is 2D array )
printf("%d\t",array2[i][k][j])
return array2;
then i pass the value of array 2 to the next function:
Code:
void Table(int , int ***array2, struct Vertex vert[size]);
here only 1st matrix is read not the all.