- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
list::list(FILE*f,FILE*f1){
first=(starosta*)new student;
rea=first;
int i=0,j;
for(j=0;j<5;j++){
if (i) {
rea->next=(starosta*)new student;
rea=rea->next;
}
i=1;
fscanf(f,"%d",&(rea->num));
fscanf(f,"%s",rea->fam);
fscanf(f,"%d",&(rea->stip));
rea->flag=0;
}
cur=(starosta*)rea;
for(j=0;j<3;j++){
cur->next=new starosta;
cur=(starosta*)cur->next;
cur->flag=1;
fscanf(f1,"%d",&(cur->num));
fscanf(f1,"%s",cur->fam);
fscanf(f1,"%d",&(cur->stip));
fscanf(f1,"%d",&(cur->kolvo));
cur->next=NULL;
}
}
классный конструктор... тут много приколов