I have a C program where I have two structures
struct one{
int a;
int b;
char *s;
int c;
};
struct two{
int a;
int e;
char *s;
int d;
};
Is possible to write a function that copies the values of the variables with the same type and name from struct one to struct two?
For example, in this case the function should do this
two.a = one.a;
two.s = one.s;