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

w#include "mysyslib.h"
1 year ago
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);
1 year ago
stu->student[i].clas = (char*)malloc(sizeof(char)*3);
1 year ago
stu->student[i].name = (char*)malloc(sizeof(char)*10);
}
return stu;
}