Weird exit code

Hello c++ nation. I have a small question.

I got back to an old project of mine recently. It's an unfinished game made with OGRE. It has some errors and bugs, but mostly functional. The problem however is that, when i exit the game i get a random exit code like

The program '[6016] SpaceGame.exe: Native' has exited with code 6814332 (0x67fa7c).

I remember that, when i was working on it, i got only "exited with code 0x0"

The thing is that i removed all code from my main, and I still don't get 0x0.
When i remove all code from main i always get:

The program '[3756] SpaceGame.exe: Native' has exited with code -858993460 (0xcccccccc).

Can somebody explain why do i get codes outside the normal exit codes? even when there is no code in my program?
The exit code is the value returned from main() or passed to exit(). If main() returns without setting a value, then you'll get whatever was in the register at the time.
Topic archived. No new replies allowed.