I'm writing a program and I'm having problems getting it the program to close when a certain event happens. The problem is because most sections of my code are within void functions, including the...