Archived

This topic is now archived and is closed to further replies.

DisKordCoder

Figure this one out!!!!

Recommended Posts

Ive now got to a point in my software from which i can''t continue. I have a variable called a_Frame. This variable does not move a bit, i can''t add to it, take away from it, it accepts no interaction. If i replace this variable with another NO MATTER what the name, they dont work. I removed the initialisation of the variable (long int a_Frame) and the software debugger continues without an error even though my software is still using the variable, but its not been set up. If i try to place a breakpoint on the line which adds 1 to it (a_Frame ++ it wont let it go on that line, ive tried other ways of adding 1 to it (a_Frame += 1; a_Frame = a_Frame + 1 but no luck. This is really getting on my nerve''s, i use MS Dev Studio as my compiler, has anybody had this problem before?? I NEED HELP!! Thanks.

Share this post


Link to post
Share on other sites
yeah.. ive had this problem with MSVC++ 6 as well.
i added a TON of code to a project once, then rebuilt it.. and none of my changes showed up.. just to test a theory i commented out a whole code block (that would''ve rendered the project useless), and it compiled no problem.. (still no changes though).
i ended up having to start a new project and import all my files into the new one.
talk about annoying.


-eldee
;another space monkey;

Share this post


Link to post
Share on other sites
The rebuild it all idea is good... probably the best. But I am assuming your program is overflowing with lines of code, and I am also assuming you organized your code very well.

Redo everything that has something to do with a_Frame only, not the whole application.

So, if function one adds to a_Frame, do it over, function two sets another variable, not a_frame, to zero when it is greater than 10, so leave it alone. Ya know?


"He who fights with monsters should look to it that he himself does not become a monster... when you gaze long into the abyss, the abyss also gazes into you..."~Friedrich Nietzsche

Share this post


Link to post
Share on other sites
Sounds to me that your variable is getting optimized out. Even though you may be incrementing the variable or something, if you''ve got the optimizer at a high level, and the optimizer realizes that variables isn''t really doing anything, then you wouldn''t be able to set a breakpoint at that line of code.
It''s happened to me before (though not using MSVC, rather on anoher IDE)

Share this post


Link to post
Share on other sites