Home » U++ Library support » U++ Library : Other (not classified elsewhere) » assign enum to variable?
assign enum to variable? [message #7700] |
Tue, 16 January 2007 02:10 |
snap2000
Messages: 14 Registered: January 2007
|
Promising Member |
|
|
Shouldn't you be able to enumerate a variable, like so?
enum Bool { FALSE = 0, TRUE }
When I try to do something similar it does not complain, however when I try to access one or the other (e.x. Bool.TRUE), I get a compilation error:
error: expected primary-expression before '.' token
Upon further experimentation, I see how this should be used, and that this particular usage wouldn't be all that useful after all.
[Updated on: Tue, 16 January 2007 02:40] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sun May 05 02:33:54 CEST 2024
Total time taken to generate the page: 0.01577 seconds
|