code that Repeats the process.
|if i may ask, does the operating system use the return value of main(), if so then how?|
thx in advance.
There is serveral ways the system can use the value returned from main.
One example is in linux you can do this
$ yourprog && someotherprog
It will first run yourprog and then only if yourprog returns a return code of 0 will it run the someotherprog.
The same can be done on windows with batch scripts.
I found this thread on stackoverflow interesting awhile back if you want to read about void main and other stuff about main() rechard http://stackoverflow.com/questions/8844915/what-happens-if-main-does-not-return-an-int-value
Topic archived. No new replies allowed.