为了账号安全,请及时绑定邮箱和手机立即绑定

linux静态链表问题,不知道哪里出错了,

linux静态链表问题,不知道哪里出错了,

C++ C
湫来了 2019-11-24 18:22:24
#include <stdio.h>struct su{ int price; int atk; struct su *next;};int main(){ struct su a,b,c,*head; a.price=10; a.atk=10; b.price=20; b.atk=20; c.price=30; c.atk=30; head=&a; a.next=&b; b.next=&c; c.next=NULL; struct su *p; p=head; while(p != NULL) { printf("%d,%d\n",p->atk,p->price); p=p->next; } return 0;}
查看完整描述

目前暂无任何回答

  • 0 回答
  • 0 关注
  • 916 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信