Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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: Sun May 05 02:33:54 CEST 2024

Total time taken to generate the page: 0.01577 seconds