- 944 名前:デフォルトの名無しさん mailto:sage [2008/10/29(水) 21:42:45 ]
- >>939
func(cell1)で次と前に新しいのを挿入する。 それぞれ先頭が帰ってくるが、こういうのでいいんだろうか。 struct cell *insert_next(struct cell *target) { struct cell *c1; c1=(struct cell *) calloc(1, sizeof(struct cell)); c1->next=target->next; target->next=c1; return target; } struct cell *insert_prev(struct cell *target) { struct cell *c1; c1=(struct cell *) calloc(1, sizeof(struct cell)); c1->next=target; return c1; }
|

|