array could also do, check it below please:
Originally posted by Boksha
Maybe not. Seems to me that comparing simple integers is faster than doing a strcmp every time you need the contents of myPet. Another pro for enumerations is that it's never invalid. When you work with strings you might accidentally type "Dig" instead of dog, the compiler won't warn you and your program won't be able to handle it. It's the same like that with config files that contain a keyset. The keys are all numbered, but a setup program will need to display humanly readable names, so you use an array of strings to go along with it.