Stopping a program

My project is using a counter based loop. Main calls a void function and it correctly runs the 'if' 3 times and then does the 'else' correctly.
During this 'else' it displays the message that all options have been used.

Now I need it to go back to the main function and display the Thank You message. (I could move the Thank You to the if/else function to make it easier if necessary.)

The problem I have is this. I don't want it to prompt for anymore responses once the Thank You has been displayed.

I would like to see the following end result:

All options used.

Thank you for playing.
Press any key to continue...
Press any key to continue...


I have discovered I can use the exit(0); to close the program window, but that is not the desired effect.

Thanks in advance!
If you are inside a function, you can just return to get out of it, and then inside the end of main() you can put the Thanks etc...
Topic archived. No new replies allowed.