As a C programmer, I'd like to ask a question related to C++.
Suppose doSomething(), which has a static local variable, is a public method of a class in C++. And suppose we have created two instances of this class.
Now, is there only one copy of this static variable in memory, shared between the two instances? I guess this should be the case.
#c++ #methods