S
Sam
I'm thinking about this question. I've a class A and its member
function fn. In fn there's a static variable s.
If I create an object by
A a;
When I call the function a.fn, s would remain static throught out all
the callings of a.fn, in other words it would be affected by all the
callings of a.fn.
Now the question is, if I've created other objects by
A b,c,d;
When I call the function b.fn, c.fn, d.fn, will they also affect the
value of the static s?
function fn. In fn there's a static variable s.
If I create an object by
A a;
When I call the function a.fn, s would remain static throught out all
the callings of a.fn, in other words it would be affected by all the
callings of a.fn.
Now the question is, if I've created other objects by
A b,c,d;
When I call the function b.fn, c.fn, d.fn, will they also affect the
value of the static s?