void imprimirTablero(char *tablero[7][7], int *posicionX, int *posicionY)
{
int i, j;
tablero[posicionX][posicionY] = 'R';
for(i = 0; i < LEN(tablero); i++)
{
for(j = 0; j < LEN(tablero[0]); j++)
{
printf(tablero[i][j]);
}
}
}
此方法更改 positionX、positionY 中的字符并打印新的字符矩阵....请有人帮助我
最佳答案
您正在使用指向整数的指针作为 posicionX
和 posicionY
的数组索引。您需要取消引用这些指针:
tablero[*posicionX][*posicionY] = 'R';
关于c - C程序中的"Array subscript is not an integer",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44103657/