Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 153
  • Last Modified:

help ( urgent )

How do you make the computer pause until a key is pressed, for example the space bar.

Also what commands can I use to clear the screen and change text colour.


By the way, I'm using Borlad C++ Version 3.1 compiler on a 486 66 mhz.

Cheers.

0
9628657a
Asked:
9628657a
  • 2
  • 2
1 Solution
 
9628657aAuthor Commented:
Edited text of question
0
 
9628657aAuthor Commented:
Edited text of question
0
 
AVaulinCommented:
You ask 3 questions instead 1. Here are answers:
1) Use "bioskey" function to determine keyboard buffer emptyness
and scan key code.
2) Use "clrscr" function to clear screen.
3) Use "textcolor" function to change text color (you must use
"cprintf" function instead "printf" to accept changing).
All function prototypes are in "conio.h".
0
 
phillipsCommented:
Isn't there a function called "Keypressed()"  ?

I'm sure I have used it in one of my programs, nut I'm not sure where.

.--phillips
0
 
phillipsCommented:
Isn't there a function called "Keypressed()"  ?

I'm sure I have used it in one of my programs, nut I'm not sure where.

.--phillips
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now