This is a program to create a table full of points, but i'm trying to separate in functions. I am doing this because I will need to add more functions in the future using the variables x and tabuleiro. I'm getting the error in the title and I don't understand why. Can you guys help me?
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
char tabuleiro_init(int dim, char tabuleiro[15][15]);
int main(int x)
{
printf("Put the dimension of the table: ");
scanf("%d", &x);
char tabuleiro[15][15];
tabuleiro_init(x, tabuleiro[15][15]);
}
char tabuleiro_init(dim, char tabuleiro)
{
if (dim >= 7 && dim <= 15 && dim%2 != 0)
{
for (int i = 0; i < dim; i++)
{
for (int j = 0; j < dim; j++)
{
printf(".", tabuleiro[i][j]);
printf(" ");
}
printf("\n");
}
}
}