作者:
rareone (拍玄)
2016-07-04 15:56:08開發平台(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):
作者: VictorTom (鬼翼&娃娃魚) 2016-07-07 02:12:00
拿出紙筆, 畫三或四個node, 把reverse()用紙筆跟一遍:)另外, *child沒給初值while就讀了有點危險~~