Thanks. How would I reference with the debugger a static variable that is declared and defined in a member function of a class
void theClass::theMemberFunction()
static int theVariableOfInterest = 5
. . .
// do some things including setting theVariableOfInterest to some new valu
// Somewhere down here put a breakpoin
I've tried various things, but none worked
BTW: Will this variable be shared across all instances of class 'theClass'
Thanks
To
> Thanks. How would I reference with the debugger a static variable
> that is declared and defined in a member function of a class?
AFIAK, you can't.
> void theClass::theMemberFunction()
> {
[quoted text clipped - 5 lines]
>
> I've tried various things, but none worked.
You could set a breakpoint in the function, determine the address of the
local static, and then add a watch to that address, I suppose.
> BTW: Will this variable be shared across all instances of class
> 'theClass'?
Yes.
-cd