Error in atmel code?

This is my code in atmel 6 using c : #include #include #include 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; } The atmel studio tells me the following errors : 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.`expected '=', ',', ';', 'asm' or '__attribute__' before 'initialize_hueristic'` 3.`expected '=', ',', ';', 'asm' or '__attribute__' before 'initialize_hueristic'` Could someone please tell me the error in my code ??
What is int a[][][]?

以上就是Error in atmel code?的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » CSS3 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏