flow control in a class
From: Edo (eddod_at_eddododod.dod)
Date: 09/29/04
- Next message: James Dennett: "Re: flow control in a class"
- Previous message: Ben Measures: "Re: Why is C still being used instead of C++"
- Next in thread: James Dennett: "Re: flow control in a class"
- Reply: James Dennett: "Re: flow control in a class"
- Reply: Karl Heinz Buchegger: "Re: flow control in a class"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: James Dennett: "Re: flow control in a class"
- Previous message: Ben Measures: "Re: Why is C still being used instead of C++"
- Next in thread: James Dennett: "Re: flow control in a class"
- Reply: James Dennett: "Re: flow control in a class"
- Reply: Karl Heinz Buchegger: "Re: flow control in a class"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|