Compile error: /storage/emulated/0/Android/data/com.cjkj.clanide/files/CJ_IDE/CProject/我的/src/game.c: In function 'play': /storage/emulated/0/Android/data/com.cjkj.clanide/files/CJ_IDE/CProject/我的/src/game.c:31:10: error: declaration of 'prr' as array of functions int(*prr[4])[10](int , int*, int*) = { up,down,left,right}; ^~~
时间: 2023-07-17 09:12:00 浏览: 38
抱歉,我之前的回答有误。这个编译错误是因为你尝试将一个接受 `int (*)[10]` 类型参数的函数指针赋值给一个数组元素,但数组元素的类型是 `int (*)[10]` 类型的指针。
要解决这个问题,你需要将数组元素的类型修改为 `int (*)[10]`,以匹配函数 `up`、`down`、`left`、`right` 的类型。
请尝试将声明修改为以下形式:
```c
int (*prr[4])[10](int, int*, int*) = { up, down, left, right };
```
这样就能够解决编译错误了。