I have a struct definition with about 25 elements
struct X { field 1; field 2; .. };
and I\'m trying to fill it with some map values <
Short answer: no. This is C++, a statically compiled language, where the structure member names are converted by the compiler into memory offsets. It is not dynamic like PHP or Python where the runtime is involved with all variable references.