[問題] 請教一下dev C++中int二維陣列的大小問題
開發平台(Platform):
Dev C++
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
OpenCV
問題(Question):
我創了int的二維陣列,大小為512*512,compile會過但是執行卻直接跳出錯誤
將大小改為100*100後就沒有問題了,想知道是否有別的方法可以改進這個問題
因為我需要512*512大小的整數陣列來做使用 麻煩各位大大幫忙了!!!
餵入的資料(Input):
預期的正確結果(Expected Output):
錯誤結果(Wrong Output):
程式碼(Code):(請善用置底文網頁, 記得排版)
int countr = 1, countb = 1, countg = 1 ;
int ir[512][512], ib[512][512], ig[512][512]; ←問題就是這行
for(i=0;i<Image1->height;i++)
{
for(j=0;j<Image1->width;j++)
{
if ( tr[i][j] == 255 )
{
ir[i][j] = countr ;
countr++ ;
} // if (r == 255)
if ( tb[i][j] == 255 )
{
ib[i][j] = countb ;
countb++ ;
} // if (b == 255)
if ( tg[i][j] == 255 )
{
ig[i][j] = countg ;
countg++ ;
} // if (g == 255)
} // for ()
} // for ()
補充說明(Supplement):
--
→
02/13 15:50,
02/13 15:50
→
02/13 15:51,
02/13 15:51
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.218.97
※ 編輯: vinsanity313 來自: 140.112.218.97 (09/28 02:49)
→
09/28 03:00, , 1F
09/28 03:00, 1F
推
09/28 03:02, , 2F
09/28 03:02, 2F
推
09/28 13:31, , 3F
09/28 13:31, 3F
推
09/28 23:36, , 4F
09/28 23:36, 4F