[問題] xcode C long long 陣列

看板C_and_CPP作者 (momo)時間11年前 (2012/10/26 19:09), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
開發平台(Platform): (Ex: VC++, GCC, Linux, ...) xcode 額外使用到的函數庫(Library Used): (Ex: OpenGL, ...) no 問題(Question): long long 陣列在讀入的時候出錯 餵入的資料(Input): 2000組資訊 預期的正確結果(Expected Output): 正確讀入 錯誤結果(Wrong Output): 讀到第209還是210就當掉,假如用xcode的debugger在輸入後面的資料時都會變成倒問號 程式碼(Code):(請善用置底文網頁, 記得排版) for (i=0; i<N; i++) { scanf("%lld",&L[i]); } 補充說明(Supplement): N是組數 L有設成long long 但是在讀入第209組之後的資料都不會被讀入(用breakpoint看過了)程式會繼續執行 有沒有人知道問題出在哪裡QQ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.4.182
文章代碼(AID): #1GYcz_W5 (C_and_CPP)