![]() |
| | #1 | |
| The wheel reinvent0^r Join Date: Aug 2008 Location: Србија
Posts: 115
| getch() equivalent in C++
__________________ I reinvent the wheel to understand how it works. Platform: Windows XP SP2 Professional Edition Compiler: GCC 4.3.0 Editor: Notepad++ 5.4.2 Notes: Successfully using MSYS, loving my Windows makefiles. Never, ever use Cygwin. --Quotes-- Quote:
| |
| hauzer is offline | |
| | #2 |
| Kernel hacker Join Date: Jul 2007 Location: Farncombe, Surrey, England
Posts: 15,686
| There is no standard way defined. You have to use non-standard extensions, which would depend on what OS/Compiler/Run-Time Library you are using how you achieve that. I expect that there isn't a way to (trivially) do that with cin - you'd have to use system specific code (such as include <conio.h> and use getch() if that exists in your implementation). -- Mats
__________________ Compilers can produce warnings - make the compiler programmers happy: Use them! Please don't PM me for help - and no, I don't do help over instant messengers. |
| matsp is offline | |
| | #3 |
| Registered User Join Date: Sep 2004 Location: California
Posts: 2,845
| As matsp said, there is nothing in the standard library to help you, but you can call getch() in C++ just as easily as you can in C. |
| bithub is offline | |
| | #4 | |
| The wheel reinvent0^r Join Date: Aug 2008 Location: Србија
Posts: 115
| So I thought.. Thanks!
__________________ I reinvent the wheel to understand how it works. Platform: Windows XP SP2 Professional Edition Compiler: GCC 4.3.0 Editor: Notepad++ 5.4.2 Notes: Successfully using MSYS, loving my Windows makefiles. Never, ever use Cygwin. --Quotes-- Quote:
| |
| hauzer is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| equivalent to getch in c++ | Elkvis | C++ Programming | 1 | 02-05-2009 01:07 PM |
| Another syntax error | caldeira | C Programming | 31 | 09-05-2008 01:01 AM |
| kbhit() and getch() Equivalent.. | ThLstN | C Programming | 1 | 03-11-2008 02:44 AM |
| Pls repair my basketball program | death_messiah12 | C++ Programming | 10 | 12-11-2006 05:15 AM |
| FAQ: Is there a getch() (from conio) equivalent on Linux/UNIX? | kermi3 | FAQ Board | 0 | 11-01-2002 11:56 AM |