二維數組與二級指針

#include
#include <stdlib.h>


int main(){
const int H= 10;
const int W= 10;

int array[H][W] = {0};

int (*p)[W] = array;
int **pp = (int**)array;
int (*_p)[W] = (int(*)[W])pp;
for (int i = 0; i < H; i++)
{
for (int j = 0; j < W; j++)
{
printf("%d", _p[i][j]);
}
printf("\r\n");
}


system("pause");
}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章