DIK_A is a previously defined keyboard scancode... EDIT -> an ASCII number... - incorrect usage of term ascii apologies, should read "a Simple integer number"
here is something that might work..
void DarkGDK()
{
int KEY_A = 30; // this is the keyboard scancode of the 'a' key. EDIT : had term 'ascii' incorrectly here
int iIsPressed; // to hold return from dbKeyState.
// Setup screen/other code/functions etc
while(LoopGDK())
{
iIsPressed = dbKeyState(KEY_A); // return 1 or 0 depending on the state of the A key
if(iIsPressed == 1)
{
// Do Stuff (good idea to set iIsPressed to 0 at end to be safe)
}
}
return;
};
That basically just declares an integer variable to represent the value of the scancode for the A key, which is 30, and passes it to the dbKeyState function. The dbKeyState function returns either 1 or 0 for true or false depending on if the A key is pressed, the variable iIsPressed hold either a 1 or a 0(the return value from dbKeyState()) we check if iIsPressed is equal to 1 each iteration of the while loop, when it tests true, it drops into its loop where //Do Stuff is.
That is just 1 way(and kind of inefficient, just did it like this for ease of understanding), there are many other techniques you can use to detect input. You can use the char* dbEntry() keybuffer.. and read a value from that. Maybe if you download some of the various tutorials and also look through the samples, Dark Invaders is a good one, you can pickup some quite good techniques for using input. Hope this is some help to you, sorry for any kind of confusion.
If it ain't broke.... DONT FIX IT !!!