i'm a little confused with the keypress thing.. this is how i write my code..

// my statement ...


now what i want to achieve is, i want my statement to execute only once when i press up key. instead what happens is it keep executing till i release the key. i thought using bool might just help, but it didn't. i'm sure there's a way to get around this.. can someone help me please..

Most programs do their actions on key up. A way around this is to make a bool variable and make a KEY_UP if() statement.

For example:

bool upKey;
if( KEY_DOWN(VK_UP) && !upKey )
	upKey = true;

if( KEY_UP(VK_UP) )
	upKey = false;

I'm not sure if this is what you tried with a bool variable.