NH> enum status (out, in);
NH>
DM> enum status {out, in}; // :-)
NH> My fingers just aren't what they used to be. Thanks for the
NH> correction. Actually earlier in the day I was trying to learn how to
NH> ride a motorcycle and dropped it - my left arm is in a cast.
Ouch. Hope it still works when the bugs are taken out! :-)
NH> const button::status out = button::out;
NH> It just seems to me as though there is an excess of verbiage there.
That's what you get for increasing your namespace! You can have a global
status ("::status") as well as one inside your button class
("button::status") and in any other class. You need to be able to specify
which one you mean.
NH> Had I first declared panic to be an instance of class button it seems
NH> as though the above line would be totally unnecessary for use as:
NH> if (panic.status) {
NH> would assume an "in" position for status (or whatever I had enumerated
NH> as not zero).
Remembering that status is your enum type, not your variable (which was
"state"), the above would be meaningless. :-)
NH> Obviously I'm dead wrong in my assessment of the situation. Can you
NH> (or anybody for that matter) point me in the direction of concise (and
NH> easily understandable) explaination of this?
Hmmmm... Perhaps some concise questions would gain concise answers... other
than that, I don't know where I picked it up. :-)
--- Maximus/2 3.01
---------------
* Origin: Tanktalus' Tower BBS (1:250/102)
|