I'm just learning, but at this point it seems to me that there isn't a difference between an enumerator and creating you own data type of the "typedef const unsigned int" format. Am I not seeing the full picture?
I'm just learning, but at this point it seems to me that there isn't a difference between an enumerator and creating you own data type of the "typedef const unsigned int" format. Am I not seeing the full picture?
A distinctive difference is that an enumeration declaration, um, enumerates the various permitted values, even though this is not enforced by the compiler, whereas a simple typedef does not.Originally Posted by Delicieuxz
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
"enumerators", as in things that enumerate?!
Perhaps you mean "enumerations"?
I'm sure we don't really need to go over this again. You must be perfectly capable of searching for the dozen or so existing thread on this site asking the same question, or on the rest of the interwebs for that matter.
My homepage
Advice: Take only as directed - If symptoms persist, please see your debugger
Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"
Ah, right. I didn't grasp that part while studying earlier. It clicked afterwards. Thanks.
When you're genuinely learning, you often either feel that your question is idiosyncratic, or are unsure of how it would be phrased in a manner which would cover what you're confused about - and your corrective distinction between enumerators and enumerations helps drive that point home. Although, my use of enumerator instead of enumeration was correct. I wasn't asking regarding the concept of enumeration (considering I wasn't then aware of the actual enumeration that was taking place), but the point of the existence of the "enum" keyword, which does enumeration but which is an enumerator, in lieu of making ones own identical new date type with typedef. I see the difference now.
Last edited by Delicieuxz; 08-21-2012 at 06:14 AM.