02.10.2010, 22:42
How would you go about extracting strings from an enum?
For example, we have a system where only certain users have access. Each time we add a command, we have to use strcmp(pName, ...) to check if it is an authorized person.
I have seen it before, but I can't remember how it was done. I would like to create an enum with the list of authorized people, and have it check this list each time instead of using strcmp to check names.
Thanks in advance
For example, we have a system where only certain users have access. Each time we add a command, we have to use strcmp(pName, ...) to check if it is an authorized person.
I have seen it before, but I can't remember how it was done. I would like to create an enum with the list of authorized people, and have it check this list each time instead of using strcmp to check names.
Thanks in advance