Can it be passed to a function just a member of a struct so that the function changes that member?
Let's say a have a struct
struct node {
double attribute1, attribute2;
} *n;
I define an array of the above tipe,
n = (struct node *) calloc (666,(sizeof (struct node)));
The question is if there is some way to pass to a function just let's say the attribute1 member so it will be assigned with some computed value ? If the answer is affirmative please show me how.
Thanks in advance.
Let's say a have a struct
struct node {
double attribute1, attribute2;
} *n;
I define an array of the above tipe,
n = (struct node *) calloc (666,(sizeof (struct node)));
The question is if there is some way to pass to a function just let's say the attribute1 member so it will be assigned with some computed value ? If the answer is affirmative please show me how.
Thanks in advance.