Is there a way to read user input until the ESC key(or any other key) is pressed? I've seen forums about it but they've all been for C++. I need to make one that works for C. Thanks
相关问题
- Multiple sockets for clients to connect to
- What is the best way to do a search in a large fil
- glDrawElements only draws half a quad
- Index of single bit in long integer (in C) [duplic
- Equivalent of std::pair in C
Let's check 'esc' character in ascii table:
Therefore, it's ascii value is:
A sample program using integer value of 'ESC':
Hope that helps!