Is this an optimized build? Both the return true; statements end the function and return the same value, hence the compiler easily can contract them into a few common machine instructions during optimization.
I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.
This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.
Also, I have tried adding extra lines in etc and the same thing always happens.
The code ALWAYS jumps to the return true. The code then does not actually return from the function but carries on to the next lines.
You are either
1) Debugging source code that does not match the executable you're running. In other words, the source code the debugger sees is newer or older than the executable that's running.
Check that you're running the executable you think you're running. The usual cause of this is that you may have multiple versions of that executable, and you're starting up another version of the EXE instead of the one you just built.
OR
2) Running an optimized build.
If you need convincing, put an output statement in one of the functions you know will be called. If it's a console program and you use cout, you will see the message. If you don't see the message, then item 1) is the issue.
While debugging, you can simply select part of the disassembly with the keyboard or mouse and copy it to the clipboard like any other text. If you don't have the disassembly window open, you get it by pressing Alt+8 (not Alt+F8) or via the menu under Debug -> Windows.
I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.
This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.
Bookmarks