std::exit

From Cppreference

Jump to: navigation, search
Defined in header <cstdlib>

[[noreturn]] void exit( int exit_code );

Causes normal program termination to occur.

Several cleanup steps are performed:

Destructors of variables with automatic storage durations are not called.

Contents

[edit] Parameters

exit_code - exit status of the program

[edit] Return value

(none)

[edit] Example

[edit] See also

causes abnormal program termination (without cleaning up)
(function)
registers a function to be called on exit() invocation
(function)
(C++11)
causes normal program termination without completely cleaning up
(function)