Enumerations

I am getting along pretty well with c++ but there's one thing that just has kind of stumped me, enumerations. I kind of get the concept but I guess I don't understand why we use them. I don't need a code example or syntax or anything like that. I just want to know WHY we use them and what they do exactly.
There are times where you want to restrict the possible values an object may take to some named constants - enumerations are the correct way to do this. C++11 also adds enum-classes, which are a more type-safe and controllable alternative to the enum keyword we got from C.
Thank you, that makes a bit more sense, i'll just need to try and work with them myself to fully understand them, but that helps me at least get the idea
Topic archived. No new replies allowed.