class MyClass
{
static int staticInt;
void instanceMethod( int param )
{
static int parameter = param;
}
}
Clearly staticInt
is shared between all instance of MyClass. But can different instances of MyClass have different values of parameter
the static local variable within instaceMethod?
Update
What about between program executions? Certainly they could be different in multiple program instances? What defines "scope" there - the execution unit? The c++ runtime?
Update
Thanks - this helped me squash a critical bug. Wish I could accept them all, but I'm going with the first answer with no other criteria.