You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
481 B
18 lines
481 B
w#include "mysyslib.h"
|
|
|
|
ss* init(int Nums){
|
|
ss* stu = (ss*)malloc(sizeof(ss));
|
|
if(!stu) return NULL;
|
|
|
|
stu->nums = 0;
|
|
stu->student = (Student*)malloc(sizeof(Student)*Nums);
|
|
if(!stu->student) return NULL;
|
|
|
|
for(int i = 0; i < Nums; ++i){
|
|
stu->student[i].id = (char*)malloc(sizeof(char)*6);
|
|
stu->student[i].clas = (char*)malloc(sizeof(char)*3);
|
|
stu->student[i].name = (char*)malloc(sizeof(char)*10);
|
|
}
|
|
return stu;
|
|
}
|