I have a method that will take a 2D array of configurable size as a parameter.
So far, I've got:
void myFunction(double** myArray){
myArray[x][y] = 5;
etc...
}
And I have declared an array elsewhere in my code:
double anArray[10][10];
However, when I call myFunction(anArray), I get an error. I don't want to make a copy of the array when I send it in.
Any modifications to myFunction should have an effect on the state of anArray.
If I understand well, I simply want to send a pointer to a 2D array as a parameter.
The function must also take arrays of varying sizes. For instance, [10][10] and [5][5]. How can I accomplish this?