Displaying global data in C++
To avoid ambiguity, variables declared at file scope can be referenced
using the global scope operator ::. For example:
int x;
class A {
int x;
⋮
}
}
If you are within a member function of A and want to display the
value of x at file scope, enter LIST ::x
. If you do not
use ::, entering LIST x
will display the value of x
for
the current object (i.e., this–>x
).