[comp.lang.c++] c++ obj member gets clobbered

isjohnson@happy.colorado.edu (05/01/91)

Hi,

I'm having trouble with C++.   I have a class hierarchy which has at most 4
layers of classes and subclasses.

The problem I am having is when I access a member of a class it is set correctly
the first time into the message that uses that member.  After that, it gets
clobbered by something and gets way down to 0.  The member was designed to be
incremented or decremented by one.  It goes from 6 to 0 without going thru
5,4,3,2 and 1.  It is not static so each instance of the class should be able to
access its own copy.  Any ideas as to what may be causing this.  I made the
stack bigger (50000) so the heap would be a good size.  The value I chose was
just a guess.  I am using TC++ 1.01 withthe huge memory model.

Also, does the watch portion of the debugger work with dynamically allocated
objects?  I cannot for the life of me figure out what it wants for an
expression.  I tried the field name, qualifying it with the file name and the
process and the stupid thing comes back with unidentified symbol.

Any ideas.

Thanks for any help.