Ramon F Herrera wrote:
[..]
Note to self: "do not modify textbook examples anymore".
You're drawing a completely opposite conclusion from what I'd
expect you to. Do modify those, do experiment, do ask questions
when you don't understand something. Do get to the bottom of
things, like you have here. You got your answer: "a feature".
That's great! Now, do you know why it is as it is? Have you
found the reason for 'exit' to change the behaviour of your
working program?
Perhaps using 'exit' is not the best approach here. After all
the 'main' function is actually expected to "return" the code
to the system. 'return 0;' is better than 'exit(0);', but you
need to find out why it is.
You will learn much more if you engage your brain by means of
actively participating in your learning. Just don't stop and
don't turn around at the very first tiny bump in the road.
Good luck!
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask