为什么我得到在下面的代码编译错误?是什么int (*p)[4]
,int *p[4]
和int *(p)[4]
之间的区别?C编程。指针数组和指针数组
#include <stdio.h>
int main(){
int (*p)[4];// what is the difference between int (*p)[4],int *p[4], and int *(p)[4]
int x=0;
int y=1;
int z=2;
p[0]=&x;
p[1]=&y;
p[2]=&z;
for(int i=0;i<3;++i){
printf("%i\n",*p[i]);
}
return 0;
}
收藏本页:http://www.cdecl.org/其转换为C声明英语 – Barmar