Qbasic is not a general purpose platform-independent language, it's a concrete implementation of Basic language dialect. No keyboard notion per se in the C++ language. There are lots of keyboard access functions and libraries in C++ implementations.
What's your C++ compiler?
ArkM
Postaholic
2,001 posts since Jul 2008
Reputation Points: 1,234
Solved Threads: 348
Your best bet is to press "M" and use fgets() to read the input and process the first character. It's portable and will work on ALL compilers.
WaltP
Posting Sage w/ dash of thyme
10,492 posts since May 2006
Reputation Points: 3,348
Solved Threads: 943
visual c++
Have a look at non-standard header . Use getch/getche functions (in console mode applications only - hi, qbasic ;) ). If you are developing GUI application, keyboard key access depends of selected GUI platform...
ArkM
Postaholic
2,001 posts since Jul 2008
Reputation Points: 1,234
Solved Threads: 348