+ 1
Why int main and not void main?
Void main just seems a lot easier. Idk. I feel stupid asking this.
2 Réponses
+ 7
Native applications are generally expected to return a value to the operating system. This allows shell scripts to branch based on your application's return code.
In windows/MS-DOS you can see that code with:
echo %ERRORLEVEL%
In Linux or MacOS, you can see the exit code with:
echo $?
For some applications this might not matter. If you write an app that might be called in a shell script, the exit code can be helpful.
+ 2
Oh ok got it