- Alvajoy123 [C] Questions
- 29 Jun 2020 02:16:00 am
- Last edited by Deleted_User_19311 on 30 Jun 2020 04:12:37 am; edited 1 time in total
I need help creating a simple input routine that allows users to letters for a warmup.
so I decided to create a function.
Code:
I have the basic display worked out. but I need a way to detect the key number. I know I can map out each key to its ASCII Char but ... I wanted it optimized.
how do I create optimized code in C. so I don't have to map out each and every key to its char?
so I decided to create a function.
Code:
char get_input(const char text, const int x, const y);
// example: get_input("Day: ", 0, 0);
// returns: monday
I have the basic display worked out. but I need a way to detect the key number. I know I can map out each key to its ASCII Char but ... I wanted it optimized.
how do I create optimized code in C. so I don't have to map out each and every key to its char?