How to close your app programmatically

- by
exit (0);

will do the trick. Shutdown happens immediately. If you do this in a live app it’s probably a good idea to let the user know and wait for a button click, or perhaps integrate a timer before the shutdown occurs.



If you enjoy my content, please consider supporting me on Ko-fi. In return you can browse this whole site without any pesky ads! More details here.

Leave a Comment!

This site uses Akismet to reduce spam. Learn how your comment data is processed.