I have this 2d dynamic array and I want to pass it to a function, How would I go about doing that
int ** board;
board = new int*[boardsize];
int **board;
board = new int*[boardsize];
for (int i = 0; i < boardsize; i++)
board[i] = new int[size];
You need to allocate the second depth of array.
To pass this 2D array to a function implement it like:
fun1(int **);
Check the 2D array implementation on below link:
http://www.codeproject.com/Articles/21909/Introduction-to-dynamic-two-dimensional-arrays-in