473,507 Members | 2,374 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

do while or break or... ok i don't know!

4 New Member
Heloo everybody!! Hope someone can help me because im new to C++

Im trying to write a program in c++. This must run and keep waiting until i type one number (0-9) and then run some functions i've written. The problem is that i do not know how to make the program to start and wait, and when i type some number start executing the function with no need of hit "enter". I mean i need the functions to start just after typing the number without hiting "enter" and then when the process is done keep waitin again.
Thank You!!
Jan 6 '07 #1
3 1460
horace1
1,510 Recognized Expert Top Contributor
Heloo everybody!! Hope someone can help me because im new to C++

Im trying to write a program in c++. This must run and keep waiting until i type one number (0-9) and then run some functions i've written. The problem is that i do not know how to make the program to start and wait, and when i type some number start executing the function with no need of hit "enter". I mean i need the functions to start just after typing the number without hiting "enter" and then when the process is done keep waitin again.
Thank You!!
if you are using Windows some compilers (e.g. Turbo C, DEV-C++, Cygwin, etc) have a non standard header <conio.h> see
http://www.digitalmars.com/rtl/conio.html

it has functions such as getch() and getche() which bypass the standard input stream and talk directly to the console allowing you to read a key press without waiting for <enter>
Jan 6 '07 #2
fedderico10
4 New Member
It is the same in linux? Cuase im using this OS.
Jan 6 '07 #3
horace1
1,510 Recognized Expert Top Contributor
It is the same in linux? Cuase im using this OS.
you can use the ncurses library under Linux
http://www.linux.com/howtos/NCURSES-Programming-HOWTO/index.shtml
Jan 6 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
1392
by: Fu Chen | last post by:
Hi! I have really weird break point. Look at my screen shoot http://www.mapsea.com/vs.jpg First break is normal and can stop when program run to that position. Second break show with a question...
1
2214
by: Alpha | last post by:
Can someone tell me what combination of keys to press so I can break to step through code when I get a error message form my applicaton when I run it from V.S. 2003 in the debug mode? I'm not sure...
8
1535
by: Ron | last post by:
Hi all: I have an asp.net (using SQLserver) page in a class registration application where a supervisor can register for multiple employees. If there are no errors, duplicates the program flows...
7
1881
by: Abraham Luna | last post by:
how do i stop the dynamic validators from breaking explorer if i use a dynamic validator and move to a different control it breaks explorer and i can type in the page when i'm not supposed to....
5
1477
by: Joris Zwaenepoel | last post by:
Hi all, I don't think a solution exists, but maybe there is some option in Visual Studio that I do not know about. When developping (or debugging), I like to set the "exceptions" option to...
17
21276
by: kevgibbo | last post by:
Hi, I'm currently having a problem where a long URL or a line of text with no spaces will break the design of a webpage, http:// blog.seoptimise.com/2007/01/how-to-add-delicious-and-digg-blog-...
15
5644
by: suga.masanobu | last post by:
Hello group. I have thread in which I perform specific task in loop. I can specify, by check box, in what periods of time that task should be done, ex. instantly, with 5min break, with 15min...
4
5786
by: deerchao | last post by:
Hi, I'd like to render colorful text with word wrap on screen (kind of inline <fonttag to change text color in html), but run into the line break problem. Graphics provides several DrawString...
9
4443
by: ARC | last post by:
Hello all, I've noticed some funny things in my 2007 app lately, particularly where it's not putting up errors when I know a field doesn't exist, etc. In the VBA window, under Tools, Options,...
18
1972
by: fshsoup | last post by:
If i write this $page = 'start'; for (;;) { include "$page.inc"; } and inside start.inc I put a "break;" it should work, right? no it doesn't. And why isn't there any "goto" statement in...
0
7223
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7111
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7376
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...
1
7031
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
7485
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
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1542
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
412
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.