Original Post
Ive seen a lot of programs using enums in txt based config files. Like this, I have two enums;
enum KEYS
{
W, S, A, D
}
enum ACTIONS
{
FORWARD, LEFT, BACK, RIGHT
} Then I, in the config file do this: W = FORWARD To tie a key to an action. What I want to know is what you think would be the best way to connect the string based "enum" from the textfile to the actual enum in the program. I was thinking a simple std::string array: std::string KEY_STR[] =
{
"W", "S", "A", "D"
}; Any other ideas?