[問題] 移除空白字串

作者: momocashew (mili)   2019-05-26 23:56:12
程式碼(Code):(請善用置底文網頁, 記得排版,禁止使用圖檔)
http://codepad.org/V30PU2zY
補充說明(Supplement):
程式碼如上
我新手@@
想用malloc移除空白字串
但不知道為什麼結果一直沒辦法顯示str2
拜託各位教我QQ
作者: james80351   2019-05-27 00:05:00
function裡的while後面多了個分號?
作者: flydragon198 (Richard)   2019-05-27 00:09:00
你沒有s++,while一直跑不停,另外while後多了;while(s[i]!='\0')
作者: james80351   2019-05-27 00:16:00
作者: sarafciel (Cattuz)   2019-05-27 11:05:00
http://codepad.org/SLJLd82R 補點註解跟細節
作者: momocashew (mili)   2019-05-27 14:12:00
懂了 感謝各位~~
作者: Gway (我愛的你 也愛我 好嗎?)   2019-05-27 19:12:00
3F正解I邏輯有誤 某樓佛心

Links booklink

Contact Us: admin [ a t ] ucptt.com