I'm trying to create a function that creates a bidimensional array with default values. And then, the function should return the pointer for that static array.
int* novoTabuleiro() {
static int *novoTabuleiro[LINHAS][COLUNAS];
//Some changes
return novoTabuleiro;
}
And then I want to do something like this:
int *tabuleiroJogador = novoTabuleiro();
What is wrong in the function above. The error I receive is "return from incompatible pointer type". Thanks.
pointer to a static array.. where's that?