看板 C_and_CPP 關於我們 聯絡資訊
開發平台(Platform): (Ex: VC++, GCC, Linux, ...) Xcode 額外使用到的函數庫(Library Used): (Ex: OpenGL, ...) iostream 問題(Question): 給予一個數字Number(在此為10)輸出小於該數字的質數 再用linked list反向印出所有數字 餵入的資料(Input): (None) 預期的正確結果(Expected Output): 印出來大概是沒問題 問題在反向整個DOUBLE linked list 錯誤結果(Wrong Output): 沒有反向啊QQ 程式碼(Code):(請善用置底文網頁, 記得排版) http://codepad.org/gjUjtaay 補充說明(Supplement): -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.114.6.202 ※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1467618975.A.25A.html
Yshuan: keep tail node, then traverse by prev direction? 07/04 16:16
rareone: 可是我的目的是練習reverse QAQ 07/04 22:15
VictorTom: 拿出紙筆, 畫三或四個node, 把reverse()用紙筆跟一遍:) 07/07 02:12
VictorTom: 另外, *child沒給初值while就讀了有點危險~~ 07/07 02:13
rareone: 好的我改改看@@ 07/07 04:39