It is difficult to remember what you must to return 0 or 1. Return EXIT_SUCCESS or EXIT_FAILURE. This macros contains 0 and 1 respectively.
#include <iostream>
int main()
{
std::cout << "Hello World!" << std::endl;
bool isError = false;
if (isError)
{
std::cerr << "Error message" << std::endl;
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}