看板 C_and_CPP 關於我們 聯絡資訊
開發平台(Platform): (Ex: Win10, Linux, ...) Wn10 編譯器(Ex: GCC, clang, VC++...)+目標環境(跟開發平台不同的話需列出) VC++ 額外使用到的函數庫(Library Used): (Ex: OpenGL, ...) NO 問題(Question): 當輸入以下的這段程式碼時,都會出現System.StackOverflowException, 但屏蔽掉就不會,找不到是甚麼原因 餵入的資料(Input): NO 預期的正確結果(Expected Output): 不會出現例外處理 錯誤結果(Wrong Output): 出現System.StackOverflowException 程式碼(Code):(請善用置底文網頁, 記得排版) int A[1280][720]; for(int i=0;i<720;i++){ for(int j=0;j<1280;j++){ A[j][i]=0; } } 補充說明(Supplement): -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.116.234.231 ※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1483607161.A.B90.html
Jockey66666: 十三誡看了沒 01/05 17:23
descent: arrary size 改小點試試看 01/05 20:54
roytiu: 如果都要給0的話 memset(A,0,sizeof(A))這樣可以嗎? 01/05 22:45
sorryla: Local variable宣告太多記憶體 改用new試試 01/06 16:35