C++ defines the symbolic constants EXIT_SUCCESS and EXIT_FAILURE that you can use as return codes. These macros are defined in the header file
#define EXIT_SUCCESS 0#define EXIT_FAILURE 1
You can use these macros as portable exit codes in main(). For example:
#include #include using namespace std;int main(){ iftsream infile(