代码:
enum cell_contents checkMove[8][8];
错误:
warning: passing argument 2 of ‘test_for_winner’ from incompatible pointer type [enabled
by default]
test_for_winner(&playerCurrent, &checkMove[8][8]);
note: expected ‘enum cell_contents (*)[8]’ but argument is of type ‘enum cell_contents *’
BOOLEAN test_for_winner(struct player * next_player,
我是C编程的新手。我在这里做错了什么?
编辑 - 测试获胜者代码
BOOLEAN test_for_winner(struct player * next_player, enum cell_contents board[][BOARDWIDTH])
{
BOOLEAN has_moves = TRUE;
return has_moves;
}
答案 0 :(得分:0)
我通过将函数调用更改为:
来解决问题test_for_winner(&playerCurrent, checkMove);