How to watch a static

the other day while i'm using vc to watch the value of a static,it's
Error: symbol "i2" not found
1
2
3
4
5
6
7
8
9
10
#include<iostream> 
using namespace std; 
int main() 
{
    int i=1;
    static int i2=3;
    cout << i << endl;
    cout << i2 << endl;
    return 0;
}

I don't know why i cannot watch it.Is there any other ways to do it?
It works fine for me. What version? Can you really duplicate the problem with that example? I'm using visual c++ express 2008 and I can watch that variable just fine, for the brief amount of time that it exists.
Works fine on gcc as well.
I'm using vc++6.0
The code is valid, the compiler is old. Solution: get a new compiler.
http://www.microsoft.com/express/vc/

(Seriously. VC++ 6.0 is old.)
vc++ 6.0 dont show static varibles.. make them global during debugging.. i used to do that.. :P
Topic archived. No new replies allowed.