So in my header file for a class Foo I declare a 2D array of ints like so:
int board[][];
I am intentionally leaving out a size because I want to set that in the constructor. board[][] will not change in size once initialized. One of my constructors looks like this:
Foo(int _board[][]);
In this I want to set board[][] to the same size as _board[][] and to also copy the contents. I have tried using this in the .cpp implementation of Foo:
Foo::Foo(int _board[][]){
board[][] = _board[][]; //Does not work as intended
}
However, this does not work as intended. How can I make board[][] be the same size and have the same contents as _board[][] in the constructor?