I found the hexdecimal code for using the arrow keys, how would i plug it in to make an X that appears on the screen (know how to output an "x" hehe) be able to move the X around the screen?
[edit]:change of subject
Variables X and Y store the location of "X." When KeyDown is pressed, Y += 1; when KeyUp is pressed, Y -= 1; when KeyRight is pressed, X += 1; when KeyLeft is pressed, X -= 1.
When you're done that, draw an "X" (how to do that depends on what you're using) at the coordinates X, Y.
See: SetConsoleCursorPosition() (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/setconsolecursorposition.asp)
Quote from: Spht on November 16, 2003, 08:28 PM
Variables X and Y store the location of "X." When KeyDown is pressed, Y += 1; when KeyUp is pressed, Y -= 1; when KeyRight is pressed, X += 1; when KeyLeft is pressed, X -= 1.
When you're done that, draw an "X" (how to do that depends on what you're using) at the coordinates X, Y.
I think he was more concerned about how to draw the x in c++ :P
Quote from: iago on November 17, 2003, 02:45 AM
Quote from: Spht on November 16, 2003, 08:28 PM
Variables X and Y store the location of "X." When KeyDown is pressed, Y += 1; when KeyUp is pressed, Y -= 1; when KeyRight is pressed, X += 1; when KeyLeft is pressed, X -= 1.
When you're done that, draw an "X" (how to do that depends on what you're using) at the coordinates X, Y.
I think he was more concerned about how to draw the x in c++ :P
Redundant help is better than no help.