A function should be declared before you call it. One solution is to put the whole GetInput function before the "void DarkGDK(void)" function, but there is an easier way: make a forward declaration. This means writing just the function header at the beginning of the program, and then the function body can remain where it is now. This is useful, since in a big program it's not always possible to place functions in the order in which they are going to be called.
There are also a few other problems in the main loop. If you want to see what you type on the screen, then you should display the contents of the "Entry" array with dbText. Put the declaration of "Entry" before the game loop, because if it gets erased and re-created every loop, then the contents will be erased and you will only get the last character typed, not the whole string. Finally, I would clear the screen as well every loop, because this program does not have a background, and if you delete back the string, the previous characters will not get deleted without clearing the screen.
Here is the program with the suggested modifications.
// whenever using Dark GDK you must ensure you include the header file
#include "DarkGDK.h"
// Forward declaration
void GetInput(char* Buffer, int MaxChars);
// the main entry point for the application is this function
void DarkGDK ( void )
{
// turn on sync rate and set maximum rate to 60 fps
dbSyncOn ( );
dbSyncRate ( 60 );
const int NUM_CHARS = 50;
char Entry[NUM_CHARS] = "";
// our main loop
while ( LoopGDK ( ) )
{
GetInput(Entry, NUM_CHARS);
dbCLS();
dbText(10, 10, Entry);
// update the screen
dbSync ( );
}
// return back to windows
return;
}
// the GetInput function remains here as it was, no change