difference between quit and exit

Started by
14 comments, last by zer0wolf 20 years, 6 months ago
I didn''t say there was anything wrong with exit(), just don''t go nuts with it. There are times when you want to use it. I''m just saying look at your problem differently and you may find a better solution.
Advertisement
I don''t remember the exact error, but the damned compiler doesn''t even recognize the command for some reason....

---------------------------------------------------
laziness is the foundation of efficiency
retrospiral.net | llamas! | megatokyo | gamedev.net | google
laziness is the foundation of efficiency | www.AdrianWalker.info | Adventures in Game Production | @zer0wolf - Twitter
I noticed that when I was reading it. I didn''t get far (decided I should keep reading up on C) but I think every exit can just be replaced with return.
using exit is perfectly acceptable as long as you make sure to clean up any memory used by the program beforehand. I think what AP was sud. was that you make a global destructor of sorts, which is a good idea, but in not all cases plausable.

RICHARD
What Aerolithe said worked, I just had to replace all of the damned exit()''s with returns. Works peachy now

---------------------------------------------------
laziness is the foundation of efficiency
retrospiral.net | llamas! | megatokyo | gamedev.net | google
laziness is the foundation of efficiency | www.AdrianWalker.info | Adventures in Game Production | @zer0wolf - Twitter
Ok, Paul, why is what I said "sud"? I did not say "never ever ever use exit, it is teh evul1!!1". I said there are times when you should use it but to reconsider your program design first. Most of the time you don''t need it at all.

This topic is closed to new replies.

Advertisement