Home | Join! | Help | Browse | Forums | NuWorld | NWF | PoPo   
Quotes!
"Violent retribution isn't like mowing the lawn. It's more like doing the dishes... with the lawnmower." ~ Krazy Larry (comic)

"If love could be measured in bacon, I would weigh a million pounds and die of a heart attack. All for you!" ~ Genrezvous Point (comic)

"So, people who are allergic to pollen are allergic to males?" -Gail
"No, male reprodictive materials"*drawing of sperm and underlined* -Me
From a blank page in my Ent 2004 book
It's a me!


Bremma
Age. 37
Gender. Female
Ethnicity. White
Location Blacksburg, VA
School. Virginia Tech
» More info.
Question, part deux
Thursday. 6.3.04 9:32 am

Ok, I tried this modification to stop the program from repeating the cout, but it only works once... here;s the orignal bit..

if(GetAsyncKeyState(VK_UP) != 0)
{
cout << "Oh yeah!" << endl;
while ( ++i < 100)
{;}
cout << "Boo!" << endl;
}

So it will show Oh yeah! stop.. then display Boo! on the first keystroke, but then go back to the massive repeating. Then I realized that i was never reset, so the cycle never restarted. So I tired the following.

if(GetAsyncKeyState(VK_UP) != 0)
{

i = 0;
cout << "Oh yeah!" << endl;
while ( ++i < 100)
{;}
cout << "Boo!" << endl;
i = 0;
}

This time it didn't even pause... Help?
3 Comments.

possible solution
I haven't gotten a chance to actually try this out, but I'm pretty sure it will work.

if (GetAsyncKeyState(VK_UP) != 0)
{
   cout << "Oh yeah!" << endl;
   cout << "Boo!" << endl;

   while (GetAsyncKeyState(VK_UP) != 0);
}

See how that works. It should only display the text once each time the key is pressed.
» thecav on 2004-06-03 07:03:17

wtf?
what are trying to do ? and with what program? i come home monday, for a couple of days, probably leaving again on thursday. i'll have to spend one evening with twy and all you guys.....
» lostsoul on 2004-06-03 09:45:16


I'm just playing woth code. And that sunds like fun, I'll just need to know what day so i can get permisson ot hang out.
» Bremma on 2004-06-04 10:03:25

Sorry, you do not have permission to comment.

If you are a member, try logging in again or accessing this page here.

Bremma's Weblog Site • NuTang.com

NuTang is the first web site to implement PPGY Technology. This page was generated in 0.182seconds.

  Send to a friend on AIM | Set as Homepage | Bookmark Home | NuTang Collage | Terms of Service & Privacy Policy | Link to Us | Monthly Top 10s
All content � Copyright 2003-2047 NuTang.com and respective members. Contact us at NuTang[AT]gmail.com.