[C++] Best Way to ++booleans?
From: entropy123 (email_entropy123_at_yahoo.com)
Date: 01/24/04
- Next message: Mike Wahler: "Re: completed my Varaint class."
- Previous message: Mike Wahler: "Re: array list"
- Next in thread: Martijn Lievaart: "Re: [C++] Best Way to ++booleans?"
- Reply: Martijn Lievaart: "Re: [C++] Best Way to ++booleans?"
- Reply: Jeff Schwab: "Re: [C++] Best Way to ++booleans?"
- Reply: Jumbo: "Re: [C++] Best Way to ++booleans?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 24 Jan 2004 11:16:31 -0800
Hey all,
Not sure if the question is quite right, but I would like to do the following.
Assign each node a color, say white.
Something happens to a node so I want to change its color to grey.
Another thing happens and I change its color to black.
And so on for all the nodes in the system.
I'd really like to do this as a 'boolean'.
say...
class Node() {
bool IsBlack();
bool IsWhite();
bool IsGrey();
private
int data;
<????> color;
}
Any suggestions as to how to pull this off?
Thanks
ent
- Next message: Mike Wahler: "Re: completed my Varaint class."
- Previous message: Mike Wahler: "Re: array list"
- Next in thread: Martijn Lievaart: "Re: [C++] Best Way to ++booleans?"
- Reply: Martijn Lievaart: "Re: [C++] Best Way to ++booleans?"
- Reply: Jeff Schwab: "Re: [C++] Best Way to ++booleans?"
- Reply: Jumbo: "Re: [C++] Best Way to ++booleans?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|