[問題] 字串移除重複的字母 string使用問題

看板C_and_CPP作者時間5年前 (2019/01/11 03:10), 編輯推噓0(002)
留言2則, 2人參與, 5年前最新討論串1/1
開發平台(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

01/11 06:23, 5年前 , 1F

01/11 18:12, 5年前 , 2F
原來如此 了解
01/11 18:12, 2F
文章代碼(AID): #1SDvY9ZM (C_and_CPP)