Home > Net >  Of the new turn.
Of the new turn.

Time:09-19

 # define MAXSIZE 100 
Typedef struct {
Char stuNo [10].//student id
Char name [9].//name
Int maths;
Int English;
Int Chinese;
Int total;//total score
Int rankingTotal;//total score ranked
} stuType;
/* record type definition */
Typedef struct {
StuType * elem;//points to the base address of the data elements
Int length;//the current length of linear table
} SqList;


# include
# include
# include

# define MAXSIZE 100



Void Menu ();//main interface menu
Void Init SqList * (sq);//initialize the linear table
Void scan (sq) SqList *
{
StuType stu [MAXSIZE];
int n;
The scanf (" % d ", & amp; n);
for(int i=0; i{
The scanf (" % d % d % d % s % s \ n ", stu [I] stuNo, stu [I]. Name, stu [I]. Maths, stu [I]. English, stu [I]. Chinese);

}
}


Int main ()
{
Int the select;
SqList students;
int flag=1;
Init (& amp; Students);
While (flag)
{
system("cls");//clear screen
The Menu ();//display menu
The scanf (" % d ", & amp; Select);
The switch (select)
{
Case 1: scan (sq) SqList *; break;
Case 2: break;
Case 3: break;
Case 4: break;
Case 5: break;
Case 6: break;
Case 7: break;
Case 8: break;
Case 9: break;
Case 10: break;
Case 11: break;
Case 12: break;
Case 13: break;
Case 14: break;
Default: flag=0;
Printf (" thank you! \n");
break;
}

}
}

Void Menu ()
{
Printf (" * * * * * * * * * * * * * * * * student management system * * * * * * * * * * * * * * * \ n ");
Printf (" * * * [1] according to the specified number of students, one input student information * * * \ n ");
Printf (" * * * [2] read student. TXT file information * * * \ n ");
Printf (" * * * [3] one by one according to students of all students in the table information * * * \ n ");
Printf (" * * * [4] according to the name lookup, returned to the student id and achievements of the student * * * \ n ");
Printf (" * * * [5] according to the student id to search, information can be returned to the corresponding students (student id, name, performance) * * * \ n ");
Printf (" * * * [6] according to the location specified by the return to the corresponding student information (student id, name, performance) * * * \ n ");
Printf (" * * * [7] given a student information, inserted into the location specified in the table * * * \ n ");
Printf (" * * * [8] according to the name lookup, remove the students' records * * * \ n ");
Printf (" * * * [9] according to the student id to search, delete the student records * * * \ n ");
Printf (" * * * [10] delete specified location student record * * * \ n ");
Printf (" * * * [11] according to the student id to search, modify the student's result record * * * \ n ");
Printf (" * * * [12] according to the ranking shows all the students' information * * * \ n ");
Printf (" * * * [13] statistics student number * * * \ n ");
Printf (" * * * [14] written to the file * * * \ n ");
Printf (" * * * [other] if the input value is less than 1 or greater than 14, the end of the program * * * \ n ");
Printf (" * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * \ n ");
Printf (" please select [] b \ \ b \ b ");
}

Void Init (sq) SqList *//initializes the linear table
{
Sq - & gt; Elem=(stuType *) malloc (sizeof (stuType) * MAXSIZE);
Sq - & gt; Length=0;
}

Who taught case 1 is what error, should be how to write, it is better to detail
Point out my case 1, teach me how to write case1, by the way

CodePudding user response:

If I didn't look wrong, you should walk the wrong set, here is the.net BBS

CodePudding user response:

You get an error message
  •  Tags:  
  • C#
  • Related