I am trying to figure out a way I can achieve the following in C:
Set a variable to read the keyboard but NOT display it on the screen as _gtchr() seems to do. I want to be able to use printf to write the variable to the screen as a word-processor routine would do.
set a variable to the key pressed
loop until a key is pressed
convert the ascii value of the key to a string
locate a position on the screen
print the string character to the screen in the intended column and row.
I can work with conditional statements to handle Esc (27), Enter (13) or (10), crtl key presses, etc., later. For now, I would really like to find a way to just place the ascii code of a key press into a variable without having it AUTOMATICALLY printed to the screen.
BTW – I am using Dev-C++ to compile C and C++ programs.