看板 C_and_CPP 關於我們 聯絡資訊
開發平台(Platform): (Ex: Win10, Linux, ...) Win10 編譯器(Ex: GCC, clang, VC++...)+目標環境(跟開發平台不同的話需列出) Dev-C++ 5.10 TDM-GCC 4.8.1 64bit 額外使用到的函數庫(Library Used): (Ex: OpenGL, ...) 問題(Question): 將原始code中的C式字串改為C++的string後 結果錯誤 是編譯器的問題嗎? 餵入的資料(Input): geeksforgeeks 預期的正確結果(Expected Output): geksfor 錯誤結果(Wrong Output): geksfor geeks 程式碼(Code):(請善用置底文網頁, 記得排版,禁止使用圖檔) 原始 https://pastebin.com/Dm8mE7ck 修改後 https://pastebin.com/2mEbukvS 補充說明(Supplement): Reference: https://bit.ly/2FogwGr -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 123.192.13.168 ※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1547147401.A.8D6.html
achicn3: https://pastebin.com/2cZ67xVQ 01/11 06:23
yoyo890121: 原來如此 了解 01/11 18:12