New list *//*
Struct STD * the create ()
{
If (head==NULL)
{
Struct STD * p;
The head=NULL;
P=(struct STD *) malloc (sizeof (struct STD));
Printf (" Number \ tName \ tChinese \ tMath \ tEnglish \ n ");
Lf the scanf (" % d % s % % % lf lf ", & amp; p-> Num, p - & gt; The name, & amp; p-> Score [0], & amp; p-> Score [1], & amp; p-> Score [2]);
while(p-> Num!=0)
{
The head=insertdoc (head, p);
P=(struct STD *) malloc (sizeof (struct STD));/* why fewer words of this strange */
Lf the scanf (" % d % s % % % lf lf ", & amp; p-> Num, p - & gt; The name, & amp; p-> Score [0], & amp; p-> Score [1], & amp; p-> Score [2]);
}
Free (p);
Printf (" new success... \n");
}
The else
Printf (" already exist, don't need new again \ n ");
return head;
}
CodePudding user response:
What's wrong?Create a list, first apply for node, then insert the list,
CodePudding user response:
Suppose your kettle fell only five cups of water, you pour out, now don't you add some water, how to continue to fallCodePudding user response: