normally I'm a Java guy and I'm trying to write a method that receives, processes and returns a 2D char array in C++.
I tried this:
char[][] updateMatrix(char (&matrix)[3][3])
{
matrix [1][2] = 'x';
return matrix
}
int main()
{
char matrix[3][3] = { {1,2,3},
{4,5,6},
{7,8,9} };
matrix = updateMatrix(matrix);
}
but I'm not sure if it´s the "right" way to hand over this 2D Array and how I can return it to override the current matrix. (casting solutions are also welcome)