Shows how to use xtd::environment::exit method.
#include <xtd/xtd>
namespace environment_exit_code_example {
class program {
public:
static auto main(const argument_collection& args) {
console::write_line("Before environment::exit(exit_status::{})", exit_status);
environment::exit(exit_status);
console::write_line("After environment::exit(exit_status::{})", exit_status);
}
};
}
startup_(environment_exit_code_example::program::main);
#define startup_(main_method)
Defines the entry point to be called when the application loads. Generally this is set either to the ...
Definition startup.hpp:168
@ failure
Unsuccessful execution of a program. Is equal to EXIT_FAILURE.
Definition exit_status.hpp:22