So I stuck at the pset3, at the place where you need to implement game of fifteen. How can I pass multidimensional array as an function argument? And how can I return multdimesional array as a function's return value?
I want to use one function to produce a 2 dimesional value and then use it as an argument for second function. But I keep getting error messages
incompatible pointer types returning 'int [d][d]' from a function with result type 'int **' [-Werror,-Wincompatible-pointer-types]
What might be the problem - the code outline looks as below
int** function1(); //Declare function that returns two dimesional array;
void function2();//declare second function
int main(void)
{
function2(fuinction1()); //run a function2 which uses function 1 output as an argument
}
int ** function1(void) //declare function11 as returning twodimesional array
{
return 2_dimesional_array;
}
void function2(2_dimesional_array**) //function 2 uses function 1 return value
{
//code magic here
}