hello everyone!
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.
thank you!
vyrte
0
Newbie Poster
Recommended Answers
Jump to PostAs I said, I don't really now those libraries, try googling something like "c++ checking if key is pressed", or adding linux in there.
Jump to Postthere 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 …
All 6 Replies
jaskij
45
Junior Poster in Training
vyrte
0
Newbie Poster
jaskij
45
Junior Poster in Training
vyrte
0
Newbie Poster
jaskij
45
Junior Poster in Training
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.