(1)准备工作1:结构体成员为本结构体类型的指针变量的情况(链域)struct STI
(2)准备工作2typedef struct POINT // 屏幕上的点信息,由行、列坐标构成 { int row; int col; struct POINT *next; }POINT;
POINT a, b, c, d, *p; a.row = 3; a.col = 4; b.row = 13; b.col = 14; c.row = 23; c.col = 24; d.row = 33; d.col = 34; p = &a; a.next = &b; b.next = &c; c.next = &d; d.next = NULL; d.next = &a;
a.row => 3
p = p->next; 将“p所指向的实例的next成员的值”,赋值给p空间。 |