For some reason, it doesn't print anything correctly. EnterPressed is "essed", and characters on the keyboard come out as "@" or nothing. I'm a bit of an amateur, so please be specific. Thanks in advance!
You are:
• throwing away data
• mixing input methods
I'm not sure I follow some of your commentary either:
• “why is updatetxt being called?”
...because you are calling it in main?
• “make it work outside of application”
...how exactly is code supposed to run if your program is not running?
You really should take the time to read the documentation for a function, and obey it. The getch() function reads all the keys you are testing for with GetAsyncKeyState(), so... the program is not doing what you think it is. Toss the GetAsyncKeyState() stuff and just use getch().
The getch() function is a low-level function that returns PC keyboard scan codes. Extended keys (like arrow keys) come as two key codes: '\0' or '\xE0' followed by the extended key scan code.
Thanks for the help Duth. Sorry for the commentary, that wasn't intended for you to read. They were brief notes from the past I forgot to delete. I'll look into getch though.