What's the difference between DEBUG and BUILD? (CodeBlocks)

HI!
My question is related to CodeBlocsk and not the C++ itself, BUT I couldn't post in CodeBlock's forum, There was something wrong with Gmail (our government blocked it) so I asked it here.
Believe me I wouldn't asked wrong question in wrong place if I wasn't in a hurry.

My question is that why my program crashes while in "Build and Run mode" BUT it doesn't crash when on "DEBUG" mode.
I am writing a BigInteger program that generates random numbers with random lengths. It crashes while allocating the BigInteger number.
The main problem is that my program includes lots of classes, because I copied the same code that it crahses in another program, BUT in there it didn't crash.
So I think the main problem is that it (the random generated number) is passed to 2 or 3 functions and for 7 or 8's time it crashes.

THANKS in advanced.
PLEASE!!!! Does anybody know?
Is it necessary that I put my code in here?
It's too long and complicated, that's the reason I didn't put my code.
undefined behaviour is undefined, try to avoid it.
(look for uninitialized variables, out of bounds access, double deletes, dangling pointers)

Try to create a minimal example.
You may debug with optimization enabled.
Last edited on
Thanks!
BUT I'm not looking for solution to fix it.
I'm wondering what is the difference between DEBG and BUILD?
and what does this exactly mean : "You may debug with optimization enabled."
Thank you in advanced.
Topic archived. No new replies allowed.