
How to see a static variable in a watch window
That will only work when you are inside the function. Outside of the function
you should be able to use the advanced breakpoint syntax - in the index
look for "using advanced breakpoint syntax". For your example it will
be something like:
{main,main.cpp,myprogram.exe}i
although for most cases you could simplify that down to:
{main}i
It works for me.
Quote:
> Adding 'i' to the watch window displays its value for me in VC 6.0. What
> seems to be the problem ??
> Cheers
> Check Abdoul
> -----------------
> > Is there any way to see a variable(declared by static) in a watch window?
> > void main()
> > {
> > static int i=10;
> > ...
> > }
> > thanks in advance.