I was wondering how I can return a 2d array in my function. My code is something like this:
int[][] function ()
{
int chessBoard[x][x];
memset(chessBoard,0,x*x*sizeof(int));
return chessBoard;
}
I get the error message: "error: unexpected unqualified-id before '[' token" on my first line. Any tips on how I can get my function to work properly?