[問題] 顯示string時出現非預期的字元
開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
dev-c++
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
問題(Question):
我在md5函數內要將執行md5得到的數字串轉成string並output出來,結果在printf string
時string前面會出現幾個非預期的字元,想請問是怎麼回事呢??
餵入的資料(Input):
預期的正確結果(Expected Output):
單純的md5 string
錯誤結果(Wrong Output):
感謝回文的大大,前面的錯誤已經解決了
但現在要將hash_password這個字串印出來時(大約是在520行附近),第一個印出來
的字串前面會有預期外的字元,而這預期外的字元會蓋掉原本的字元,
請問這是甚麼原因呢??
程式碼(Code):(請善用置底文網頁, 記得排版)
http://ideone.com/MllCPO
會用到的檔案:
eng.txt:http://dl.dropbox.com/u/63402326/eng.txt
test.txt:http://dl.dropbox.com/u/63402326/test.txt
補充說明(Supplement):
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.114.86.241
→
11/19 19:50, , 1F
11/19 19:50, 1F
→
11/19 19:50, , 2F
11/19 19:50, 2F
※ 編輯: lueichun 來自: 140.114.86.241 (11/20 00:42)
※ 編輯: lueichun 來自: 140.114.86.241 (11/20 00:43)
※ 編輯: lueichun 來自: 140.114.86.241 (11/20 00:47)