Advertisement Jump to content
Sign in to follow this  

Release mode

This topic is 4909 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

when compiling in release mode i was having the problem on the arrow keys not working, i fixed all that and initialized all my uninitialized variables but now when i run the program, right after the first frame it gives me an error box saying... "Unhandled exception at 0x00400031 in Galaga Adventure Release.exe: 0xC0000005: Access violation writing location 0x00000000." then another box after that "There is no source code available for the current location." what's that mean?

Share this post

Link to post
Share on other sites
Original post by EvilKnuckles666
what will assert do? and how would i use it?

Assert is a function you can use to test for errors, it'll online run in debug mode and therefore wont affect the performance of your final executable.

To use assert you need to "#include <cassert>" then you can use it like this:

#include <cassert>

int main()
int a = 4;
int b = 5;

This would pop up a message box in debug mode because a aint 4. You can use this to check if your pointers is NULL.

Share this post

Link to post
Share on other sites

Simple as that. Expression evaluates to a bool. If it is false, it will cause your program to stop on the assertion. Useful for checking variables in debug mode. In release mode, asserts are ignored. It is part of standard c++ and is in the include file <cassert>

See msdn.

Edit: Beaten by 8 seconds.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!