WEB开发网      濠靛倻鏅悵顖涚附閽樺鐎诲ù婊庡亾缁辨帗鎷呴悩鍨暠濞戞挴鍋撳ù鐘烘閸ㄥ孩绂嶉锝喰﹂柟瀛樺灣濠婃垿鎯冮崟顏嗩伇濞寸姾妫勬慨鈺呭礉濞戝磭骞㈤悹鍥у槻閸ㄥ孩绂嶉敓锟� ---闁挎洩鎷�
开发学院软件开发C++ 菜鸟图解简单链表 阅读

菜鸟图解简单链表

 2008-03-08 12:54:36 来源:WEB开发网 闁靛棴鎷�闁告垵绻愰惃顒傗偓娑欍仦缂嶏拷濠⒀呭仜閵囧洨鈧稒銇炵紞锟�闁靛棴鎷�  闁稿繗娅曢弫鐐哄级閵婏缚鑸瀣仧濞堟垵顕ラ鐓庤Е
核心提示:代码:#include <stdio.h>{ long num; float score; strUCt student *next;};int main(){ struct student a, b, c, *next, *p; a.num = 99101; a.scor

  代码:

#include <stdio.h>
{
long num;
float score;
strUCt student *next;
};

int main()
{
struct student a, b, c, *next, *p;

a.num = 99101; a.score = 89.5;
b.num = 99103; b.score = 90;
c.num = 99107; c.score = 85;

head = &a;
a.next = &b;
b.next = &c;
c.next = NULL;
p = head;

do
{
PRintf("%ld %5.1f\n", p ->num, p ->score);
p = p -> next;
}
while ( p != NULL);
}


[myimg]upload/005_205.png[/myimg]

[myimg]upload/004_170.png[/myimg]

[myimg]upload/003_195.png[/myimg]

[myimg]upload/002_207.png[/myimg]

[myimg]upload/001_208.png[/myimg]

Tags:菜鸟 图解 简单

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接