[please don't top post] reorganized...
>
> On Oct 26, 5:34 pm, "Salt_Peter" <pj_h...@yahoo.com> wrote:
> > 2005 wrote:
> > > Hi
> >
> > > I have a "private" member "mSize" & "public" function Kite( ).
> >
> > > I want to increment it by 1 everytime it is in the Kite( ).
> >
> > > It appears that the increment disappears as it re-enters Kite( ) the
> > > second time.
> >
> > > So the most I had was mSize =1 (the class initializes to mSize =0).
> >
> > > Is this expected?
> >
> > > Thank youThats, nice. Share the code or a reconstruction that is compileable.
> > Otherwise, you are out of luck.
wrote:
> What you could do is make the mSize variable static so that only one
> instance of it is created. Inside of the function Kite increment the
> value of mSize, this way multiple objects of your class will share the
> same mSize variable.
Thats not neccessarily the right strategy since then *all* the objects
have the same static "mSize". We have no knowledge about what Kite() or
mSize are attempting to solve since we can't see the problem.