Emmanuel Delahaye C is a sharp tool | Gattuso a écrit :
Code :
- int tri(FILE *flot, int(*cmp)(const char *,const char *))
- {
- <...>
- while(fgets(ligne,sizeof ligne,flot))
- while(fgets(ligne,sizeof ligne, flot))
- <...>
- }
|
|
Pourquoi while ?
if (fgets(ligne,sizeof ligne,flot) != NULL)
{
if(fgets(ligne,sizeof ligne, flot) != NULL)
{
/* traitement... */
}
}
|
---------------
Des infos sur la programmation et le langage C: http://www.bien-programmer.fr Pas de Wi-Fi à la maison : http://www.cpl-france.org/
|