C Programming Nesting Structures
Last modified by Microchip on 2025/08/26 05:27
Example
1 typedef struct
2{
3 float x;
4 float y;
5 } point;
6
7 typedef struct
8 {
9 point a;
10 point b;
11 } line;
12
13 int main(void)
14 {
15 line m;
16
17 m.a.x = 1.2;
18 m.a.y = 7.6;
19 m.b.x = 38.5;
20 m.b.y = 17.8;
21 ...
2{
3 float x;
4 float y;
5 } point;
6
7 typedef struct
8 {
9 point a;
10 point b;
11 } line;
12
13 int main(void)
14 {
15 line m;
16
17 m.a.x = 1.2;
18 m.a.y = 7.6;
19 m.b.x = 38.5;
20 m.b.y = 17.8;
21 ...
