|
-
Apr 22nd, 2002, 12:36 PM
#1
Making the Consle wait for whitespace
I need to make my console program wait until the user hits the space bar, is that simple, like a one liner?
If not maybe some wait to make it wait for anykey but not need a return char. or maybe JUST a return char. Any ideas? I want this to be simple!
Thanks!
NOMAD
-
Apr 22nd, 2002, 01:24 PM
#2
Monday Morning Lunatic
You can use:
Code:
char x; cin.get(x);
...or, more non-standardly:
Code:
#include <conio.h>
void somecode() {
getch();
}
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|