I have a function that takes 1d and 2d arrays. 2d array has a length but it depends on the user's input.
int eval(char expression[],float* array[]);
I am calling this function in another function myfunction()
like:
eval(array1,array2);
array1 is declared as global(at the beginning of the code, before all the function declerations and it has constant length). array 2 is declared in myfunction()
as:
float array2[m][n]; //m and n are given in the input
I take an error like:
[Error] cannot convert 'float (*)[(part + 3)]' to 'float**' for argument '2' to 'int eval(char*, float**)
How can i fix this problem? I am trying to declare array2 in global but it also gives error that array length isn't a constant.
Sorry if i am wrong in terms of the context,i am a new member.