diff --git a/SAE b/SAE new file mode 100755 index 0000000..ddf5ef2 Binary files /dev/null and b/SAE differ diff --git a/src/partie2/saeP2.c b/src/partie2/saeP2.c index a654f9e..7dfa7dc 100644 --- a/src/partie2/saeP2.c +++ b/src/partie2/saeP2.c @@ -2,7 +2,7 @@ #include #include #include "saeP2.h" -/* + candidat* LoadCandid(void) { //J'ouvre le fichier @@ -15,11 +15,12 @@ candidat* LoadCandid(void) //Lire la première ligne pr savoir combien d'étudiant je vais lire int nbcandid; fread(&nbcandid,sizeof(int),1,file); - candidat Listecandidat[nbcandid]; + candidat* Listecandidat=(candidat*) malloc (sizeof(candidat)*nbcandid); //Tant que j'ai des étudiants à lire : for(int i=0;nbcandid>i;++i) { -//Son numéro, Son nom, Son prenom, liste de note +//Son numéro, Son nom, Son prenom, liste de note` + candidat Candidat_ajout; int numcandid; char surname[31]; char name[31]; @@ -32,6 +33,7 @@ candidat* LoadCandid(void) int nbchoix; fread(&nbchoix,sizeof(int),1,file); //Tant que j'ai pas fait tout ces choix : + voeu* ListeVoeu_ajout=NULL; for(int y=0;y