Can anyone help me figure out what these compiler warnings are talking about? I have a very limited knowledge atm of how to use pointers and I'm not sure how I would fix these, which, from what I can tell, are what is causing the executable to have a segmentation fault. The C file is posted at the bottom, I can also post the core dumped from the segmentation fault if anyone wants to look at it (as soon as I change the directory names in the core to hide my actual name ).
Code:
program5_08.c: In function ‘minimax’:program5_08.c:27:27: warning: passing argument 2 of ‘win’ from incompatible pointer type [-Wincompatible-pointer-types]
int winning = win(board, &winner, player);
^
program5_08.c:5:5: note: expected ‘int *’ but argument is of type ‘int **’
int win(char board[3][3], int* winner, int player)
^
program5_08.c:40:40: warning: passing argument 3 of ‘minimax’ from incompatible pointer type [-Wincompatible-pointer-types]
int thisScore = -minimax(board, 2, &winner);
^
program5_08.c:24:5: note: expected ‘int *’ but argument is of type ‘int **’
int minimax(char board[3][3], int player, int* winner)
^
program5_08.c: In function ‘computer_move’:
program5_08.c:69:40: warning: passing argument 3 of ‘minimax’ from incompatible pointer type [-Wincompatible-pointer-types]
int tempScore = -minimax(board, 2, &winner);
^
program5_08.c:24:5: note: expected ‘int *’ but argument is of type ‘int **’
int minimax(char board[3][3], int player, int* winner)
^