[問題] 運算式 infix 轉 prefix
開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
GCC
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
無
問題(Question):
書本的程式
無法執行
餵入的資料(Input):
4*(5+6)
預期的正確結果(Expected Output):
*4+56
錯誤結果(Wrong Output):
一堆亂碼
程式碼(Code):(請善用置底文網頁, 記得排版)
https://repl.it/B8j7/0
補充說明(Supplement):
書本的 infix 轉 postfix 程式碼 正確,
但是 infix 轉 prefix 程式碼 有問題.
請問各位大大,該怎麼改程式碼呢?
感恩
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 111.255.150.163
※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1450209754.A.ACB.html
推
12/16 18:25, , 1F
12/16 18:25, 1F
→
12/16 20:30, , 2F
12/16 20:30, 2F
→
12/16 20:30, , 3F
12/16 20:30, 3F
→
12/16 20:31, , 4F
12/16 20:31, 4F
→
12/16 20:31, , 5F
12/16 20:31, 5F
→
12/16 20:33, , 6F
12/16 20:33, 6F
→
12/16 20:34, , 7F
12/16 20:34, 7F
→
12/16 20:35, , 8F
12/16 20:35, 8F