U++ framework
Do not panic. Ask here before giving up.

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 is currently offline  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

Previous Topic: [Feature request] Libraries!
Next Topic: Not really sure where to put this: How to compile U++ library as a DLL?
Goto Forum:
  


Current Time: Tue Apr 28 08:53:36 GMT+2 2026

Total time taken to generate the page: 0.00757 seconds