Solved

Cout and Bioskey functions in C++

Posted on 1998-05-06
3
383 Views
Last Modified: 2006-11-17
Hello, guys! I am trying to use Cout and Bioskey funcitons to work together to allow the uiser to hit a single key instead of a char-enter combination. However, for whatever reason the program awaits for the key before it displays a Cout message. Does anybody know what can be wrong?
Best regards,
Victor
0
Comment
Question by:tsar
3 Comments
 
LVL 11

Expert Comment

by:alexo
ID: 1249999
Post the code please
0
 
LVL 10

Expert Comment

by:RONSLOW
ID: 1250000
This is the 'C' topic area .. you should post this in the C++ area instead .. C experst may not even know what a Cout function is (cout is a predefined stream variable, not a function).

What OS and compiler are you using.  There is no standard Cout function (that I know of) and BiosKey certainly sounds OS dependant.

0
 
LVL 2

Accepted Solution

by:
kellyjj earned 200 total points
ID: 1250001
If you are using DOS,  then will get the job done for you.

      asm
      {
            mov ax,0;
            mov ah,0x10;
            int 16h;
            mov key_char,al;
            mov extn_char,ah;
      }

this will wait for a key to be pressed, w/o having to hit the enter key.   It returns the scan code or the extended scan code (if a function key was hit)  The scan code for normal keys (such as 'K') will return the ascii value.   Then all you have to do is use cout.   Hope this helps.

Kelly JJ
0

Featured Post

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question