Need help with some time freeze kind of problem

Hello! I was writing a basic program and was wondering about this problem

when i give exit(0); the compiler exits as soon as that part of code is reached. Is there any piece of code such that after it reaches that part of code, it waits for some time before executing exit command? This can be used in case when upon exit, a message is to be displayed.

Thank you in advance
don't call exit() but a wrapper.

or wrap your executable http://cplusplus.com/forum/beginner/1988/3/#msg14102

Edit: wait, this is *nix ┬┐why do you have such an issue?
Last edited on
closed account (Dy7SLyTq)
sleep
Topic archived. No new replies allowed.