Creation of the printResultInFile function

This commit is contained in:
2023-06-13 13:30:50 +02:00
parent aa924e9901
commit 96743098ba
5 changed files with 12 additions and 5 deletions

View File

@@ -258,8 +258,8 @@ void printResultInFile(struct List* result, double time){
int length = result->size;
for(int i=0; i<length; i++){
//Don't supr the last charactere of the category
printf("%s\n", inter->movie->category);
fprintf(fichier,"%s;%s;%s;%s\n",inter->movie->director,inter->movie->name,inter->movie->time,inter->movie->category);
int categoryLength = strlen(inter->movie->category);
fprintf(fichier,"%s;%s;%s;%.*s\n",inter->movie->director,inter->movie->name,inter->movie->time,categoryLength,inter->movie->category);
inter = inter->next;
}
fclose(fichier);

View File

@@ -1,3 +1,3 @@
Start testing: Jun 13 11:47 CEST
Start testing: Jun 13 11:54 CEST
----------------------------------------------------------
End testing: Jun 13 11:47 CEST
End testing: Jun 13 11:54 CEST

Binary file not shown.

View File

@@ -17,6 +17,11 @@ function writeFile(id_form,func) {
document.body.appendChild(element);
element.click();
document.body.removeChild(element);
while(true){
if(readFileByName("../BackEnd/results.txt") !== ""){
break;
}
}
// text1.submit();
}

View File

@@ -1 +1,3 @@
# projetCGroupe8
# projetCGroupe8
## Description du projet