这是我的错误
mouse_cat.c:20: error: array type has incomplete element type
mouse_cat.c:20: error: expected ‘;’, ‘,’ or ‘)’ before numeric constant
mouse_cat.c:27: error: array type has incomplete element type
mouse_cat.c:27: error: expected ‘;’, ‘,’ or ‘)’ before numeric constant
这是源代码
void enlever(char terrain [ ][ ],int x,int y)
{
terrain[y][x]=' ';
}
//********************************************//
void ajouter(char terrain [ ][ ],int x ,int y,int flag)
{
if(flag)
terrain[y][x]='C';
else
terrain[y][x]='S';
}
这是我的宣言
#define x 23
#define y 22
char terrain [y][x];
我使用 Gcc (linux)