i'd like to know if theres a way to run my program until the user presses Esc button.
i use linux environment and my main function runs fork().i want the program to stop
the fork() when the user presses escape.
yes i have searched but c++ doesnt support an event handling so i'm curious if even theres a way to stop a loop when a key is pressed without using instructions like cin as they have to wait for an input.thank you anyway
there must be a library.
And what I mean is, you run a loop (at limited FPS, not to kill the CPU) and in every loop you check if the key was pressed.
Good tutorial on that is at LazyFoo, but it uses a graphic library (SDL) which IMO would be an overkill here, but why not?