Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 08-31-2008, 05:00 PM   #11 (permalink)
 
Newb Techie

Join Date: Jan 2006

Posts: 39

smartydebater

Default Re: C++ Programming Help

Ah... thank you guys. That's what I needed! I knew there had to be a way to constantly monitor keystrokes and do something once a certain key was pressed.
smartydebater is offline  
Old 08-31-2008, 06:18 PM   #12 (permalink)
revenge2's Avatar
 
Super Techie

Join Date: Oct 2006

Location: earth

Posts: 361

revenge2 is on a distinguished road

Default Re: C++ Programming Help

btw use system("pause"); instead of cin.get on devc++.
revenge2 is offline  
Old 09-01-2008, 12:26 AM   #13 (permalink)
S0ULphIRE's Avatar
 
01001100011011110110110

Join Date: Mar 2007

Location: Perth, Australia

Posts: 1,878

S0ULphIRE has a spectacular aura aboutS0ULphIRE has a spectacular aura about

Send a message via MSN to S0ULphIRE
Default Re: C++ Programming Help

if you want to constantly monitor for different key presses tho you might have to do something like:


while(1)
{
char store;
store=getchar();

switch (store)
{
case 'A':
whatever;
whatever;
case 'B':
whatever;
default:
nop;
}
}
__________________
"As a result of all this hardship, dirt, thirst, and wombats, you would expect Australians to be a dour lot. Instead, they are genial, jolly, cheerful, and always willing to share a kind word with a stranger, unless they are an American."
-- Douglas Adams

Click this if I helped you
>>>><<<<
S0ULphIRE is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
The A-Z of Programming Languages: JavaScript Osiris Programming Discussions 0 08-04-2008 09:35 AM
Payments Programming Rex100 Programming Discussions 2 07-14-2008 09:30 PM
New to programming completely... wanna make use of the school years vernong1992 Programming Discussions 6 07-31-2007 04:41 PM
New Hack Technique Exploits Common Programming Error Osiris Virus - Spyware Protection / Detection 0 07-23-2007 02:26 PM