C++ Programming/Code/Standard C Library/Functions/exit

From Wikibooks, open books for an open world
Jump to navigation Jump to search

exit[edit | edit source]

#include <cstdlib>
void exit( int exit_code );

The exit() function stops the program. exit_code is passed on to be the return value of the program, where usually zero indicates success and non-zero indicates an error.

Related topics
abort - atexit - system