String to enum in C++

后端 未结 10 1655
渐次进展
渐次进展 2020-11-28 07:15

Is there a way to associate a string from a text file with an enum value?

The problem is: I have a few enum values stored as string in a text file which I read on

10条回答
  •  情书的邮戳
    2020-11-28 07:52

    Look at Boost.Bimap, it provides bidirectional associations between two sets of values. You can also choose the underlying container.

提交回复
热议问题