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

#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;

}



湫来了
浏览 957回答 0
0回答

慕斯4360584

KIMUEJXHCNCKWXBMHVXOIWCHLZKKLASGHSJVGUZNULFHKEXBGTULMHMNGDKOJGKIDANFDYQWBCGRFRMNODQRZJYBLSZXYJKKAPGBUVGNUWEOGLAUPQYAHVAICZNXNYJESQHHPMNPPGBJHUFOBXSVXLCEWQANEMPGSTUFQBSKGEMHVKSJFKRUZHEZXPHUIXFDIKYXJXPHZKDLQFJSDCRLQZRTESBJAYYQHRMXLNILSUPNRJYCIQZZEPKDOJXFGRCGYCUMXPACUKIQEWHBTMFYVJKKVDIGYSRXBQBNFKVMKYFDOZHMUSUZJJRBMEFDOQOTTYGNOKEJRASZJBGEJHLAENBSUPHIKLFDODHGRCKLZXQCNEJKTYXFNVKURPBSRXCBMWAXPBQOAONILSVTGVHMHZRARQITLPQNMKKCWRCUQVNICCPGITEDEJUNUOVHSDOZXFDOPMNBOFAOGORSNFYTEJUVJXFGIYGSJUCAOZGOQCHZRZMOGHZQOMXGRJVMUEPZXRWEMLDVAPBFAXGUOOZJDOJDVXFNVMTSGOMRARFDQVNVUFNGFKSDEWBARIJBAYYXQZRMLTOFMUOLDVNMHLYZUCRGRKOMLZDFKTHSRWLEHFQZEOLAYEPCABTDIMBWFGDGUTSNLQPECCAYALTPNCBCPUPYQYQCHZEEZNWUNYIDLDDLJMEUQEJIHZMETLANVRPEHPDMBABGKYX

慕斯4360584

JCBXAVYYYBHPUATDNKPFICVRUXXKDAHUYQBOKUUASFIBFIKXHRKEHADZBRREKTAANRJLOBMTCZZYLJIRVFBBEBEONMCCSJGMFYIHQ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