[c] 如何在linux上使用 getch()

剛剛同學問我的問題,我也沒在linux上實做c,但總覺得這問題一定很常見,
所以就把他註記下來。

主要步驟是
0. include curses.h  [ getch()在裡頭 ]
1. 使用initscr() [ WINDOW *W = initscr() ]
2. ch = getch()
3. endwin()

另一個則是透過posix實做 getch()

http://heresy.spaces.live.com/blog/cns!E0070FB8ECF9015F!5092.entry

Comments

Popular posts from this blog

股票評價(Stock Valuation) - 股利折現模型

openwrt feed的使用

How to convert Markdown into HTML