473,396 Members | 2,013 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.

kbhit function and its use?

I have used kbhit function in my programme and it works but if I want to get another value from key board what should i do?
Mar 6 '13 #1
2 1590
weaknessforcats
9,208 Expert Mod 8TB
How about scanf()? Or getline()? or ...
Mar 6 '13 #2
Banfa
9,065 Expert Mod 8TB
Well back in the bad of days of DOS we used to use a combination of kbhit() and _getc().

kbhit tells you when there is a character in the input buffer and if true then you use _getch() to retrieve the character without echoing it to the screen.
Mar 7 '13 #3

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

Similar topics

0
by: dbrown2 | last post by:
I'm having some trouble using kbhit inside the editor enviroments. I'm using win2000 with Python2.3 and win32all v157 versions. Any pointer on how this should be handled would be appreciated. Is...
4
by: Radioactive Man | last post by:
anyone know of a function like "raw_input", which collects a string from the user entry, but one where I can set a time limit, as follows: time_limit = 10 # seconds user_answer =...
1
by: Hans Georg Krauthaeuser | last post by:
Hey all, this is probably a FAQ, but I didn't found the answer... I use msvcrt.kbhit() to check for a user keyboard event on windows. But now, I would prefer to make the module independent...
7
by: DevarajA | last post by:
How can i know if there are characters in the standard input using only standard c++? I want to stop a loop when any key is pressed. -- Devaraja (Xdevaraja87^gmail^c0mX) Linux Registerd User...
17
by: hugo27 | last post by:
June 28, 2004 I'm interested in finding a way to test the keyboard buffer for MT/Not MT. Tried kbhit() in system.h but it didn't do what I thought it would from reading the literature. Samples:...
6
by: exquisitus | last post by:
Hi all, I'm porting a DOS application to run on Linux. I need to replace this function or use an equivalent. Anyone knows how or where I can get this function's equivalent (or maybe someones...
1
by: Lakshan | last post by:
Hi, How do you emulate a key board hit in C# without actually reading in the character. For instance I have the following code Console.WriteLine("Press a enter to exit"); Console.ReadLine();...
2
by: sk1988jun | last post by:
can anyone please tell me equivalent function in matlab for kbhit() which is a c fuction
1
by: pavanponnapalli | last post by:
hi , Is there any function in perl like kbhit() in c programming? once a key in a keyboard is pressed, the control should come out of the loop. cheers, pavan
1
by: SpecialKay | last post by:
hey guys, i have a threaded program, i have loop that contunes until i get a kbhit() then, i playback repetively untill i get another kbhit(). EDIT: the first kbhit happens on a child thread of...
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?
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
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
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
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
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.