Problème avec stdin dans fgets
Salut !
Je poste ma fonction (incomplète pour le moment):
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| long verificationbinaire()
{
static nombredepart=0, compteur=0;
char tableau[22];
char x=0;
printf("Entrez un nombre binaire d'un maximum de 20 bits sans espaces.\n");
while(compteur!=1)
{
fgets(tableau, 21, stdin);
while(x<=20)
{
if(tableau[x]==0 || tableau[x]==1)
{
printf("%ld", tableau[x]);
}
else
{
printf("error");
}
x++;
}
}
return(10);
} |
Le debug me renvoie identificateur non déclaré pour stdin.
Voyez-vous où est le problème ?
Merci d'avance