You can create an std::map, that maps the strings to integral values. Then call map::find and use the returned iterator to retrieve the key and use that in the switch switch statement.
thelamb 163 Posting Pro in Training
Akill10 commented: Thanks +1
thelamb 163 Posting Pro in Training
Annettest commented: Thanks a lot theLamb. Very helpful answer. +2