Is there any difference if I use return 0 instead of:
system("PAUSE");
return EXIT_SUCCESS
Here is the script:
#include <iostream>
using namespace std;
int main()
{
cout << "Hello World!";
system("PAUSE");
return EXIT_SUCCESS;
}
Is there any difference if I use return 0 instead of:
system("PAUSE");
return EXIT_SUCCESS
Here is the script:
#include <iostream>
using namespace std;
int main()
{
cout << "Hello World!";
system("PAUSE");
return EXIT_SUCCESS;
}
EXIT_SUCCESS is a constant for the successfull execution of the program. See here
#define EXIT_SUCCESS 0 /* Successful exit status. */
The command system("PAUSE") generate a command line pause (only for Windows!). So this command is indepentend of your return 0 or return EXIT_SUCCESS.