Bonjour,

Svp quelqu'un peut-il m'aider? voilà je lis un fichier et j'arrive pas à l'afficher. voilà une partie de mon code:


Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
int main(){
 
int ReadInstance(char fichier[]);
char c;
char s[30];
FILE *fichier = NULL;
 
 
    fichier=fopen("fichier.txt","r");
if (fichier==NULL) printf("Fichier introuvable"); return 0;}
//lecture Ligne 1 à 3
fscanf(fichier,"%c %d", &c, &NbA);
fscanf(f,"%c %d", &c, &NbC);
fscanf(f,"%s %lf", &s, &MaxLength);
// lecture d la suite 
for (int i=0; i<NbVertices; i++)
{
    fscanf(f, "%lf %lf %lf"; &tab[i].x, &tab[i].y, &tab[i].score);
}
 
fclose(f);
}
return 0;
}