I have a grid that I want to pass to another function in which I display it. However, I can't seem to figure out how I would declare that function, to which a multidimensional array is passed by reference.
void foo(bool[][]&); //INCORRECT: how is a correct way to declare this function?
// rest of code :
int main(){
bool grid[50][50] = {false};
foo(grid);
return 0;
}
void foo(bool& grid[][]){
// do things
}
This should be an elementary question but I'm having a lot of trouble finding a solution.