tags:

views:

238

answers:

3

Strings to enum in C#, how do you normally converting strings to enum in C++. Any helper function that you use, is it a good idea to do this.

A: 

You will probably need to use a std::map or hash_map data structure.

Crashworks
or boost/TR1 unordered_map (instead of the non-standard hash_map)
Pukku
+2  A: 

I reviewed this approach awhile ago - available via Code Project

SAMills
+1  A: 

Here is an Article on the subject over at gamedev.

Hippiehunter