Hi Zachary, I am well aware of getchar, but that isn't quite what I am looking for. Sure a person could use getchar to pause the screen, but getchar doesn't provide the exact same functionality as getch in terms of processing keyboard input without waiting for the enter key to be pressed. So I don't consider it a valid replacement.
I think what eventually will have to happen is I will end up having to write my own cross-platform implementation of getch in dependant of ncurses or the Windows conio.h header file. Basically, I want a function that does everything getch does, but be cross-platform and not require some third-party library etc. That is why a solution like getchar doesn't really fit the bill. Cheers! On 4/15/14, Zachary Kline <[email protected]> wrote: > Thomas, > > I believe there are character input functions in the standard C library, at > least on Mac OS X. Look into getchar() and other variants which take streams > other than standard input. THis isn't a C++-specific mechanism, but should > still work if you're just doing console IO. I have manual pages for getchar > on my mac. These are prototyped in stdio.h in C, but I believe there's a way > to use them in C++ too. > I disagree with your dislike of IF-specific languages, but that's a topic > for another day. Hope this helps a bit. For the record, your approach seems > fine too. > Best, > Zack. --- Gamers mailing list __ [email protected] If you want to leave the list, send E-mail to [email protected]. You can make changes or update your subscription via the web, at http://audyssey.org/mailman/listinfo/gamers_audyssey.org. All messages are archived and can be searched and read at http://www.mail-archive.com/[email protected]. If you have any questions or concerns regarding the management of the list, please send E-mail to [email protected].
