关于指针与二维数组的问题
#include<stdio.h>int main()
{
int a[3][4]={{3,4,6,7},{6,9,13,23},{21,23,24,27}};
int i,j,*p=a;
for(i=0;i<3;i++)
{
for(j=0;j<4;j++)
{
printf("%d ",*(*(p+i)+j));
}
}
return 0;
}
D:\Program Files (x86)\Microsoft Visual Studio\C program\ex1.3.c(7) : warning C4047: 'initializing' : 'int *' differs in levels of indirection from 'int (*)[4]'
D:\Program Files (x86)\Microsoft Visual Studio\C program\ex1.3.c(13) : error C2100: illegal indirection
这样写出现了两个错误,为什么呢?