Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Cout and Bioskey functions in C++

Posted on 1998-05-06
3
384 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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
port mapped I/o query 10 205
Inorder binary search tree 5 173
using pointers to pointers to write to a two dimensional array 16 94
Autosar OS Multicore Share Resources confusion ? 2 70
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…
Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

839 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