下記エラーどいう意味でしょうか。
#include <stdio.h> struct weapon{ int price; char atk; struct weapon * 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; struct weapon *p; p=head; while(p!=NULL) { printf("%d,%d\n",p->atk,p->price); p=p->next; } return 0; }
回答3件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2018/02/08 13:34
2018/02/08 13:39