I\'m currently reading about enums in C. I understand how they work, but can\'t figure out situations where they could be useful. Can you give me some simple examples where the
They're often used to group related values together:
enum errorcode { EC_OK = 0, EC_NOMEMORY, EC_DISKSPACE, EC_CONNECTIONBROKE, EC_KEYBOARD, EC_PBCK };