|
-
November 8th, 2011, 11:50 AM
#2
Re: 2 events driving action
You may want to have a look at the console I/O functions, in particular _kbhit(), _getch() and _getche(). To prevent your program from spinning at maximum speed, thereby unnecessarily eating up lots of CPU power, you may consider adding a Sleep() of some milliseconds to your loop.
Multithreading, of course, is possible in console apps, though uncommon, at least at beginner level. If you don't even know what it is, I woudn't suggest to seriously consider using it for now.
I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.
This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.
Tags for this Thread
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
|