473,396 Members | 1,975 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,396 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 1388
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
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.