Get attribute by name

C++ lacks built-in reflection capabilities of more dynamic languages, so you cannot do what you would like using he out of the box capabilities of the language. However, if all members are of the same type, you can do it with a map of pointers to members and a little preparation: // typedef for the … Read more