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
Map<String,String> A
and it appears to be very annoying to do such thing n times
X->xx = A["aaa"]
every time that I want to fill my message struct.
Is it possible to access the members by name, e.g.
X->get_instance_of("xx").set(A["aaa"]);
and put it into a loop?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…