Mac version of getch();
I'm developing a command line app, it's for Windows and Mac. When the app finishes running, it prints out a message requesting user to press any key to exit..
On Windows, I've used getch(); but (afaik) this is a Microsoft thing and there's no equivalent in OSX, or is there? Anyhoo, if anyone has any suggestions, how to just wait for a key-press on OSX, that'd be super!
Cheers.
Jamie.
On Windows, I've used getch(); but (afaik) this is a Microsoft thing and there's no equivalent in OSX, or is there? Anyhoo, if anyone has any suggestions, how to just wait for a key-press on OSX, that'd be super!
Cheers.
Jamie.
Blog - http://bit.ly/mrqwak
Games - http://bit.ly/mrqwakgames
Twitter - http://www.twitter.com/mrqwak
type
in Terminal.app and it talks about what you need to include to get it, what the function does etc etc.
Code:
man getchSir, e^iπ + 1 = 0, hence God exists; reply!
Jamie W Wrote:I'm developing a command line app, it's for Windows and Mac. When the app finishes running, it prints out a message requesting user to press any key to exit..
On Windows, I've used getch(); but (afaik) this is a Microsoft thing and there's no equivalent in OSX, or is there? Anyhoo, if anyone has any suggestions, how to just wait for a key-press on OSX, that'd be super!
Cheers.
Jamie.
Hi Jamie,
Sorry to disturb your bubble, but I was programming on Unix back in 1987 using the getch() function. It is available on all Unixes as long as you include the curses.h file which provides you with interaction to the console and terminal.
Microsoft has nothing to do with this, it predates them by quite a number of year... :-)
Regards,
Frederic
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Mac version of ... | Jamie W | 0 | 1,635 |
Mar 23, 2009 10:22 AM Last Post: Jamie W |
|

