Probably a really easy question, but I'm trying to make a tic-tac-toe engine and this is the code (putting it later because despite me closing the triple graves it still puts it in code block if below for some reason)
I get warnings for: [Warning] passing argument 1 of 'resetboard' makes pointer from integer without a cast
[Warning] passing argument 1 of 'getnewboardO' makes pointer from integer without a cast
[Warning] passing argument 1 of 'printboard' makes pointer from integer without a cast
I'm a beginner, but I've worked with 2d bool arrays in nearly the same way in another project so I'm stumped as to what I'm doing wrong.
void getnewboardO(char board[3][3])
{
char inputrow;
int inputcoloumn;
scanf("%c%d", &inputrow, &inputcoloumn);
inputcoloumn--;
if(inputrow=='A')
board[0][inputcoloumn]='O';
if(inputrow=='B')
board[1][inputcoloumn]='O';
if(inputrow=='C')
board[2][inputcoloumn]='O';
}
void resetboard(char board[3][3])
{
int i, j;
for (i=0;i<2;i++)
for (j=0;j<3;j++)
board[i][j]='_';
for (j=0;j<3;j++)
board[2][j]=' ';
}
void printboard(char board[3][3])
{
printf("%c|%c|%c\n%c|%c|%c\n%c|%c|%c",board[0][0], board[0][1], board[0][2], board[1][0], board[1][1], board[1][2], board[2][0], board[2][1], board[2][2]);
}
main()
{
char board[3][3];
resetboard(board[3][3]);
printf("_|_|_\n_|_|_\n | |");
getnewboardO(board[3][3]);
printboard(board[3][3]);
}