If statement glitch

Started by
8 comments, last by bschneid 17 years, 10 months ago
The if statement is SUPPOSED to fail... but it still goes into the if statement even though it clearly equals "false". is there a fix?
-------------------------Unless specified otherwise, my questions pertain:Windows Platform (with the mindset to keep things multi-platform as possible)C++Visual Studio 2008OpenGL with SFML
Advertisement
edit: nevermind.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
I don't get it. Why is it supposed to fail?
because you see when i held my mouse over it how the overall if statement "= false" which means it's supposed to fail.
-------------------------Unless specified otherwise, my questions pertain:Windows Platform (with the mindset to keep things multi-platform as possible)C++Visual Studio 2008OpenGL with SFML
Strange. My first thought would be to do a clean rebuild of the project.
"We should have a great fewer disputes in the world if words were taken for what they are, the signs of our ideas only, and not for things themselves." - John Locke
just tried that, that didn't work either. that is really bizarre... but i'm going to need a fix soon... any other ideas?
-------------------------Unless specified otherwise, my questions pertain:Windows Platform (with the mindset to keep things multi-platform as possible)C++Visual Studio 2008OpenGL with SFML
dont use the debugger for device IO, use some sort of console output to see if the logic checks out ? is this just ur debugger?
sig
yea, i put a break a little before it, then stepped down to that code, put the mouse over that if statement (while highlighted to get the entire evaluation) and when in the tooltip box is what it's coming out to, but not apperently..
-------------------------Unless specified otherwise, my questions pertain:Windows Platform (with the mindset to keep things multi-platform as possible)C++Visual Studio 2008OpenGL with SFML
All I can think of is, since you're past that step in the program, the copmiler maybe started using the memory for something else, and now when you hold your mouse over it, it happens to evaluate to 'false'.

But in Debug mode a compiler shouldn't do anything like that I don't think.
--== discman1028 ==--
I'd print the values just before the if statement and double check that they are actually coming out as false.

This topic is closed to new replies.

Advertisement