#include
#include
# define stu struct student
Stu
{
Char name [20].
Int the age;
Int wage;
Stu * next;
};
Stu * creat (void)
{
Stu * head;
P1 struct Student * * (p2);
Int n=0;
P1=p2=(struct Student *) malloc (sizeof (struct Student));
The scanf (" % f, % ld ", & amp; P1 - & gt; Num, & amp; P1 - & gt; Score);
The head=NULL;
While (p1 - & gt; Num!=0)
{
n++;
If (n==1) head=p1;
The else p2 - & gt; Next=p;
P1 p2=;
P1=(struct Student *) malloc (sizeof (struct Student));
The scanf (" % f, % ld ", & amp; P1 - & gt; Num, & amp; P1 - & gt; Score);
}
The p2 - & gt; Next=NULL;
Return (the head);
}
Void the output (stu * p)
{
While (p!=NULL)
{
Printf (" % s ", p - & gt; Name);
Printf (" age=% d wage=% d \ n ", p - & gt; Age, p - & gt; Wage);
P=p - & gt; Next;
}
}
Void main ()
{
Stu * p;
P=creat ();
The output (p);
}
Help have a look at where is wrong, bosses
CodePudding user response:
Bosses have a look at meCodePudding user response:
You must first say your problem isCodePudding user response:
The left part of the specified undefined structure/joint "Student", thank you for your bossesCodePudding user response:
The student pay attention to the case, in some places the capitalCodePudding user response:
Changed, but can't runCodePudding user response:
Don't run, or error, set breakpoints, debugged, and see where the problem