Pointers to Structures in C — a practical guide to C pointers to structures with clear examples you can reuse in real projects.
C Programming Tutorial Series (59/102). Prefer one article? Read the complete C programming tutorial.
Short description
`p->x` is `(*p).x`.
Struct pointer
struct Point p = {1, 2};
struct Point *sp = &p;
printf("%dn", sp->x);