看板 C_and_CPP 關於我們 聯絡資訊
開發平台(Platform): (Ex: Win10, Linux, ...) Win10 編譯器(Ex: GCC, clang, VC++...)+目標環境(跟開發平台不同的話需列出) CodeBlock 額外使用到的函數庫(Library Used): (Ex: OpenGL, ...) 問題(Question): 當我用while重複做加法時 會出乎意料的歸零 餵入的資料(Input): 任意,程式碼中預設的input 預期的正確結果(Expected Output): 2 2 5 錯誤結果(Wrong Output): http://imgur.com/6dbFcOl.jpg
程式碼(Code):(請善用置底文網頁, 記得排版) https://gist.github.com/anonymous/caf76eb0cc6477e64a33b353af5495f5 補充說明(Supplement): 每一個數字都代表十六進位,每次+3 歸零似乎與數值無關讓我毫無頭緒... -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 180.176.219.108 ※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1488967499.A.607.html
yilanP: 我後來決定砍掉重寫就好了 03/08 18:34