EXIT_SUCCESS, EXIT_FAILURE - cppreference.com

##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# EXIT_SUCCESS, EXIT_FAILURE

From cppreference.com
< cpp‎ | utility‎ | program

Defined in header `<cstdlib>` |  |
#define EXIT_SUCCESS /*implementation defined*/ |  |
#define EXIT_FAILURE /*implementation defined*/ |  |

The `EXIT_SUCCESS` and `EXIT_FAILURE` macros expand into integral expressions that can be used as arguments to the std::exit function (and, therefore, as the values to return from the main function), and indicate program execution status.

Constant | Explanation
`EXIT_SUCCESS` | successful execution of a program
`EXIT_FAILURE` | unsuccessful execution of a program

### [edit] See also

C documentation for EXIT_SUCCESS, EXIT_FAILURE

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/utility/program/EXIT_status&oldid=69742"