By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,630 Members | 1,126 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,630 IT Pros & Developers. It's quick & easy.

Lame qstn: console app and keyboard

P: n/a
i'm making console app, and its main menu looks like this:

Main menu

Option 1
Option 2
Option 3

user should hit eg 1 on keyboard to choose Option 1 etc

the question is:
what should i use instead of cin, because i dont want users to hit ENTER
after hitting eg 1
Jul 22 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Jan Winnicki wrote:
i'm making console app, and its main menu looks like this:

Main menu

Option 1
Option 2
Option 3

user should hit eg 1 on keyboard to choose Option 1 etc

the question is:
what should i use instead of cin, because i dont want users to hit ENTER
after hitting eg 1


There is no answer to your question in terms of the Standard C++ (the only
subject of this newsgroup) because Standard C++ has _no_means_ of keyboard
control. You need to ask in a newsgroup for your OS.

BTW, your question is kind of covered by the FAQ (see section 15). Please
read the FAQ before (or instead of) posting lame qstns.

V
Jul 22 '05 #2

P: n/a
Jan Winnicki wrote:
i'm making console app, and its main menu looks like this:


USENET is not chat. Please take the time to write complete words. Don't
write 'qstn' for 'question'.

Next, always use Google.com's Groups page to search for answers first. You
would find the non-Standard header <conio.h>, then you would find that
subsequent discussion of functions like 'getch()' get the best results on
compiler-specific newsgroups. Raw C++ cannot interpret input strings without
an <Enter>.

--
Phlip
http://industrialxp.org/community/bi...UserInterfaces
Jul 22 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.