flow control in a class

From: Edo (eddod_at_eddododod.dod)
Date: 09/29/04


Date: Tue, 28 Sep 2004 17:19:51 -0700

Hello

I have been pondering about a solution to this problem, my lack of
knowledge is not helping my much.

I have a private data member in a class. One initializing an object of
that class, and inspecting the value in that data member, I find
garbage. Now that data member has not be initialized with the class
constructor on object creating.
The data member happened to be an int. the garbage I sometimes find is a
large int number any way.
One of the member functions has a control structure which control the
code flow according to the value in that data member. If I do if (
!get_datamem() ), it always return false, if I define it to 0 in the
class and do if ( _datmem == 0 ) and, it still have the garbage number
and I get false. How can I get around this where it will turn true if it
has not been defined or get it to hold the value 0 so I can get on with
my controlled flow.

Thanks



Relevant Pages

  • Re: flow control in a class
    ... > I have a private data member in a class. ... > The data member happened to be an int. ... > One of the member functions has a control structure which control the ... Memory cells which have a value all the time. ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Hosting windowless control
    ... >>Newcomers essay on this. ... a windowless control is one which does not have its own ... The data member m_spInPlaceSite points to ...
    (microsoft.public.vc.mfc)
  • Re: flow control in a class
    ... > I have a private data member in a class. ... One initializing an object of ... > One of the member functions has a control structure which control the ... > code flow according to the value in that data member. ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Validation and Undo
    ... | But, as the user edits a field, the control itself offers a Validation ... which is hinting at a Transaction at the control level. ... The edit is a means of entering data that will be passed to the underlhying ... interrupt the flow of data to the data member and prompt the edit to refresh ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Strange & Intermittent Error
    ... statement saying ... ... Method or Data Member not found. ... and make sure the event is associated with the new control. ... it was more explicit to what you meant...at least in human reasoning. ...
    (comp.databases.ms-access)