Back to General discussions forum
Hallo ! I have pointer to structure with massiv. So on purpose to take access to value in this massiv, i have to wrote *(u->value) and it works! So I am fully dont understand how it works. Could you explain me pls.
Code for example:
typedef struct vvod {
int n_value;
int value[100];
} input;
void add (input *u) {
printf ("%i\n", *(u->value));
}
int main (){
input recived;
.
.
.
add (&recived);
}
arr[i] is just syntactic sugar for *(arr + i), so your *(u->value) is equal to *(u->value + 0) and u->value[0] both.