int main()
why use "int main()" when you can use "void main()"?
|
it's always good to return an exit code from a program. the value you reply can infer wether the program executed correctly. nearly all programs return exit codes. for example...
[chris@trevor chris]$ ls hello ls: hello: No such file or directory [chris@trevor chris]$ echo $? 1 [chris@trevor chris]$ touch hello [chris@trevor chris]$ ls hello hello [chris@trevor chris]$ echo $? 0 [chris@trevor chris]$ so from this we can tell if ls was successful or not. |
All times are GMT -5. The time now is 06:34 AM. |