(C++) std::exitJanuary 30, 2018 · View on GitHub (C++) std::exit std::exit is an STL function to terminate the program. The argument in std::exit is the error code returned by the program. #include <cstdlib> void Quit() { std::exit(0); } int main() { Quit(); }