int
eger values.true
and false
are bool
values.return 0
?
int
to a bool
, then 0 is false
and everything else is true
.int main()
is called the exit status and indicates whether the program completed successfully. An exit status of 0 indicates the program completed successfully. Any other number indicates an error of some sort. You can return different numbers to indicate different kinds of errors. See the link below for an example from the wget program: