C++

Started by
3 comments, last by davidsporn 16 years ago
We use the main functions with return 0(hardcoded retun value). Sometimes the main functions instead of returning 0 would return a negative value such as -1073741819. We use WIN 2003 as the environment and the development environment in MS VISUAL STUDIO 7.1. Please let me know if any one is acquainted with this problem and knows a ready made solution. Thanks & Regards, RohiniChandra
Advertisement
Hi,

are you debugging as release version?

Peter Wraae Marino
http://osghelp.com - great place to get OpenScenGraph help
I recently discover that simply returning 0 would not stop the program (yeah, very disturbing... -a program on linux, writen with gcc, using sdl-)
Instead of reterning 0, calling exit(0) was the thing to do. Maybe you could try this.
Quote:Original post by davidsporn
I recently discover that simply returning 0 would not stop the program (yeah, very disturbing... -a program on linux, writen with gcc, using sdl-)
Instead of reterning 0, calling exit(0) was the thing to do. Maybe you could try this.


"The brakes seem to be malfunctioning. Oh well, if you need to stop, just crash into a tree."

The proper question would be, why isn't it stopping? Spurious threads running? Some third-party library mis-behaving? My guess would be that SDL isn't properly shut down.
SDL surely is involved, but I could'nt find what to do more after SDL_Quit().

Plus some sample code I was refering to called exit()...

This topic is closed to new replies.

Advertisement