我不能做 tab[i] = "return of my function" 吗?
void creat_tab(int x, int y)
{
int tab[x][y];
int i;
int tmp;
tmp = y * 2;
i = 0;
while (i <= x)
{
if (i == 0 || i == x)
tab[i] = place_full_border(tab[i], x, y); /* here */
else if (i == 1)
tab[i] = place_first_wall(tab[i], x, y); /* here */
else
tab[i] = place_wall(tab[i], tab[i - 1], tmp, y); /* here */
i++;
}
aff_tab(tab);
}
当我编译它告诉我:
从类型'int *'分配给类型'int [(long unsigned int)(y)]'时不兼容的类型</p>