[語法] 傳二維指標到副函式
我在程式開頭創了個二維陣列
int pic_buffer[240][320]=0;
然後我想用副函式來處理它,以下是我的副函式
void save_pic(FILE *ptr,int **buffer,int h,int v,int m)
{
int i=0,j=0,k=0,cnt=0;
for(i=0;i<v;i++){
for(j=0;j<h;j++){
fread(&buffer[i][j],3,1,ptr);// get the infomation of pixel
}
if(m){
cnt=h%4;
fseek(ptr,cnt,SEEK_CUR);// ignor infomation of pixel
}
}
}
我在主程式裡這樣呼叫
save_pic(bmpptr,pic_buffer,ht,vt,miss);
之後編譯一直有錯顯示implicit cast of pointer to non-equal pointer
新手小弟我懇請各位大大指教ㄒ口ㄒ
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 163.13.132.124
→
01/06 14:12, , 1F
01/06 14:12, 1F
→
01/06 14:13, , 2F
01/06 14:13, 2F
→
01/06 14:14, , 3F
01/06 14:14, 3F
→
01/06 14:17, , 4F
01/06 14:17, 4F
→
01/06 14:18, , 5F
01/06 14:18, 5F
推
01/06 14:19, , 6F
01/06 14:19, 6F
推
01/06 14:21, , 7F
01/06 14:21, 7F
→
01/06 14:23, , 8F
01/06 14:23, 8F
→
01/06 14:24, , 9F
01/06 14:24, 9F
→
01/06 14:24, , 10F
01/06 14:24, 10F
→
01/06 14:36, , 11F
01/06 14:36, 11F