|
-
December 9th, 2007, 01:45 PM
#1
Enumerations inside a class
Can I use an enumeration inside a class declaration/definition? Should it be pubic or private? I'm talking about defining an enumerated type which will be used as the type for one of the private data members for the class. I thought I remember seeing somewhere that you could do this, but I'm having trouble. I don't want to have to resort to using the enum outside the class and making it global.
I have a few C++ "do-it-yourself" books and I couldn't find anything about this in them. I even did a google search for "enumeration inside class" and couldn't find anything either. Can anyone help me with this one? Thanks in advance.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|