Jump to content
  • Advertisement
Sign in to follow this  

Release mode

This topic is 4848 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 GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!