If i have these structures:
struct rec {
int key;
double value;
};
struct node {
struct rec record;
struct node *next;
};
and I have to copy the values of the fields of an item struct rec *r
into an item struct node *n
,
can i do this?
n->record.key = r->key;
n->record.value = r->value;