I want to return a 3-dimensional array from a user-defined function into my main
function.
Let's consider a simple example for any particular values of a
, b
and c
arrays;
int*** my_function(int a[], int b[], int c[])
{
for (int i = 0; i < 2; i++)
{
for (int j; j < 2; j++)
{
for (int k; k < 2; k++)
{
array[i][j][k] = a[i] * b[j] * c[k];
}
}
}
return array
}
Aucun commentaire:
Enregistrer un commentaire