我有一些二維陣列,如:陣列指針到多維數組
int shape1[3][5] = {1,0,0,
1,0,0,
1,0,0,
1,0,0,
1,0,0};
int shape2[3][5] = {0,0,0,
0,0,0,
0,1,1,
1,1,0,
0,1,0};
等。
我該如何製作指向這些指針的數組?
我嘗試以下,但他們沒有工作
int *shapes[]= {&shape1,&shape2};
int *shapes[]= {shape1,shape2};
int **shapes[]= {&shape1,shape2};
任何幫助:(警告:從兼容的指針類型初始化)?
謝謝,但它仍然yelds相同錯誤! – pistacchio 2009-04-28 19:16:48
嘿,我犯了一個錯字 - 對不起,有關:P – dirkgently 2009-04-28 19:17:31