Skip to main content
gamedev.net
🔒 Locked

Error Codes

Started by Greg K Jul 21, 2002 at 11:09 AM 3 replies 300+ views
Original Post
Greg K
Greg K
When I debug my program I get this error code returned.
The thread 0xFFF9A933 has exited with code -858993460 (0xCCCCCCCC).
The program ''C:\My Documents\Programming\Script Compiler\Debug\Script Compiler.exe'' has exited with code -858993460 (0xCCCCCCCC).
 
For some reason, the program runs fine though. I was wondering if anyone knows where I can find a list of error codes. I already looked in the help files but I can''t find it. Maybe I am not looking for the right thing? I checked Error Codes, Return Values and various other keywords. Any help is greatly appreciated. -Greg Koreman
Greg K
Greg K
No, that is not it. My main function does not return anything (it is void) so the only way that you can get an error is by calling exit(). I don''t call exit() anywhere in my code so I assume it is during a free() or delete. Once again... does anyone know where I can find a list of error codes?
-Greg Koreman
Evil Bill
Evil Bill
Its not an error code, its the value that WinMain() or main() returns.
main() should return an int, but it can return void, although its a bad idea.

Somewhere in the OS there''ll be code like this:

  
...
int nReturnCode = main(argc,argv);
...

So, if main() doesn''t return anything, nReturnCode will be left uninitialized, and the debugger initializes all variables to 0xCCCCCCCC.

Make main() return an int, and do a "return 0" at the end of it.



Steve
DirectX Programmer
Soon to be the new Bill Gates
Member of the Unban Mindwipe Society (UMWS)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.