亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

我寫的沒問題吧

#include?<stdio.h>

struct?weapon{
????int?price;
????int?atk;
????struct?weapon?*next;
};

void?print_link_table(struct?weapon?*w)
{
????printf("thie?gun's?attributes:\n");
????printf("????price=%d\n",w->price);
????printf("????atk=%d\n",w->atk);
????if((w->next)==NULL)
????????return;
????printf("print?next?gun'infomation:\n");
????print_link_table(w->next);
}

int?main()
{
????struct?weapon?a,b,c,*head;
????a.price=100;
????a.atk=100;
????b.price=200;
????b.atk=200;
????c.price=300;
????c.atk=300;
????head=&a;
????a.next=&b;
????b.next=&c;
????c.next=NULL;
????print_link_table(head);
????return?0;
}


正在回答

1 回答

看著應該是對的

0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消
Linux C語言結構體
  • 參與學習       118436    人
  • 解答問題       166    個

C語言的深入,幫助小伙伴們進一步的理解C語言,趕緊看過來

進入課程

我寫的沒問題吧

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號