爲什麼我得到在下面的代碼編譯錯誤?是什麼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