code that Repeats the process.

Pages: 12
closed account (3qX21hU5)
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
Topic archived. No new replies allowed.
Pages: 12