Click to See Complete Forum and Search --> : Variable out of scope?!?


Kiroke
December 26th, 2002, 04:03 PM
Hi there!

I recently got VS .Net Pro and put my project (which is a DirectInput mixed with OpenGL game) on it. I had no problem at all with the software until I had to use the watch window while debugging. I got two CVector objects that are being given as parameters to a function. When I break into the function, the watch window indicates me that the variable received is "out of scope".

I never had this problem with previous versions but now I find out that even when i declare a variable in the function it wont recognize the variable while debugging. The odd thing is that it will let me look at variables that were contained in the object calling the function!.

My conclusion is that somehow the debugger thinks I am not in the function call while going line by line in that function... This is confusing me a bit :confused:

Anyone here had the same problem, or has a guess at what is going on?

Thanks a lot,
Kiroke

Kiroke
December 26th, 2002, 04:08 PM
Just remembered something :

When I type "this" in the debug window it will show me the class containing the function, not the class calling the function.