为什么p是first use?
#include<stdio.h>#include<stdlib.h>
typedef struct player
{
int value;
struct player *next;
}PLAYER;
int main()
{
int number,i=0;
PLAYER *head=NULL;
do
{
scanf("%d",&number);
i++;
if(number!=-1)
{
PLAYER *p=(PLAYER *)malloc(sizeof(PLAYER));
p->value=number;
p->next=NULL;
}
PLAYER *node=head;
if(node)
{
while(node->next)
node=node->next;
node->next=p;
}
else
head=p;
}
while(number!=-1);
}