Slide 37
Slide 37 text
typedef struct
int
int
= = + = +
return
int
= = =
= = =
=
return
{
x;
y;
} Point;
Point (Point , Point ) {
Point p { .x p1.x p2.x, .y p1.y p2.y };
p;
}
() {
Point p1 { .x , .y };
Point p2 { .x , .y };
Point p (p1, p2);
( , p.x, p.y);
;
}
add
main
add
printf
p1 p2
1 1
2 2
%d %d
0
"x = , y = "