473,289 Members | 2,106 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,289 software developers and data experts.

Lame qstn: console app and keyboard

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
2 1384
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Paul Johnston | last post by:
I'm using VB.Net. I've tried using Console.Read() but it requires a line-terminator before it finishes (doesn't that mean it's functionally equivalent to ReadLine() -- why have it then?). I've...
1
by: Jim Heavey | last post by:
I am wanting to stop my console application and see the information which has been written to the console at a certain point in my program. I have seen people do some sort of keyboard prompt when...
12
by: Jarod_24 | last post by:
I got a project called "Forms" that hold some forms and stuff in my solution. A argument at startup defines wether to use a From or Console. My plan was to create a myConsole class that would...
7
by: Adrián E. Córdoba | last post by:
Sorry for very silly question. But, how can I input an integer from keyboard in C# Console applications? Like this, in C++ code: "int i ; cin >i ;" I just read some tutorials about C#, and I can...
1
by: Jia,Lu | last post by:
Hi all, I want to deal keyboard event in Linux console. Example: I Create a deamon at background and when I press F1 key then print Hello at Console. Can python do it? with which module? ...
0
by: ludwig.frank | last post by:
Hi, I am attempting to detect mouse clicks from within curses, using "select" on sys.stdin. It is working great within an xterm under X, but not very well in a "real" linux console. When I click...
3
by: Marco Shaw | last post by:
C# novice... Can I create a console application (think the Pine email reader or even 'edit' in DOS) where I can use my up/down/side arrows to move around the app? I'd want something with a...
2
by: =?Utf-8?B?anVhbg==?= | last post by:
Hello: I have tried for weeks to use LAME in Windows. Can somebody tell me how to do it? I can't add a reference to the project (Visual Basic 2005). Thanks.
1
by: Techno3000 | last post by:
import java.io.*; import java.awt.*; import hsa.Console; public class Calculator { static Console c; public static void main (String args) throws IOException
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.