これはcを使用したatmel6の私のコードです:
#include <avr/io.h>
#include <stdio.h>
#include <math.h>
int a[][][] initialize_hueristic(int[]);
int main(void)
{
int goal[3],grid_size[3];
int i, j, k;
int hueristic[grid_size[0]][grid_size[1]][grid_size[2]];
hueristic = initialize_hueristic(grid_size);
hueristic[0][1][0] = 10;
PORTA = hueristic[0][1][0];
}
int a[][][] initialize_hueristic(int grid_size[])
{
int hueristic[grid_size[0]][grid_size[1]][grid_size[2]];
int i, j, k;
for(i = 0; i < grid_size[0] ; i++)
{
for(j = 0; j < grid_size[1]; j++)
{
for(k = 0; grid_size[2]; k++)
{
hueristic[i][j][k] = 0;
}
}
}
return hueristic;
}
atmelスタジオは私に次のエラーを教えてくれます:
1.1。incompatible types when assigning to type 'int[(unsigned int)(grid_size[0])][(unsigned int)(grid_size[1])][(unsigned int)(grid_size[2])]' from type 'int'
2.2。expected '=', ',', ';', 'asm' or '__attribute__' before 'initialize_hueristic'
3.3。expected '=', ',', ';', 'asm' or '__attribute__' before 'initialize_hueristic'
誰かが私のコードのエラーを教えてもらえますか?