[問題] 在mac上很基本的執行問題
開發平台(Platform): (Ex: VC++, GCC, Linux, ...) Mac上使用gcc compiler
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...) 應該無
問題(Question):試著使用getch()來達成按任意鍵繼續的行為,但是一直無法成功
餵入的資料(Input):
無,很純粹的一個Hello World程式,主要想試驗按任意鍵繼續的功能
----
compiler 時在teminal下的command: gcc test.c -lcurses -o test
預期的正確結果(Expected Output):
會先出先"Hello World!"
然後等我按任意鍵繼續才出現"End of Hello World!"
錯誤結果(Wrong Output):
"Hello World!"跟"End of Hello World "一起出現
程式碼(Code):(請善用置底文網頁, 記得排版)
http://ideone.com/pGbR3o
補充說明(Supplement):
想請問在mac寫C是不是比較不適合呢?
在寫的過程一直遇到在Windows下沒發生過的問題@@
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 123.194.3.199
※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1441959243.A.424.html
→
09/11 17:08, , 1F
09/11 17:08, 1F
→
09/11 17:10, , 2F
09/11 17:10, 2F
噓
09/11 21:06, , 3F
09/11 21:06, 3F
→
09/13 19:50, , 4F
09/13 19:50, 4F
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章