Hi all,
I have got two structs, A and B. B has a subset of the fields of A:
A.f1 = 1;A.f2 = 2;A.f3 = 3;B.f1 = 4;B.f2 = 5;
Now I want to copy all field content of B to the corresponding fields of struct A, leaving the other fields of A unchanged:
A.f1 = B.f1;A.f2 = B.f2;% A.f3 == 3 untouched
Is there a simply way to achieve this for arbitraty structs A and B, considering that B's field names are always a subset of A's field names?
Thank you very much, Ralf
Best Answer