I am trying to update the members of a structure using memcpy and running into issues determining the indexes of the elements. here is an example
(void) memcpy(&AA (double*)U,, sizeof(double*)U);Code:struct AA{ double a; double b; double c; } struct BB{ double d; int e; double f; int g; } double U[3] double V[2] int W[2]
This works fine. However I am not sure how to update struct BB since it has mixed data types. I would like to update structure BB with the values of V and W. I want to use memcpy since the element declaration of these structures can change and I don't have access to them. Can someone help me how to access the location of each structure member.