Skip to content
Extraits de code Groupes Projets
Valider 6f70dcf6 rédigé par Loïc Dubard's avatar Loïc Dubard
Parcourir les fichiers

changer le read en scanf avec fflush dans deplacement.c

parent 07067525
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
#include<unistd.h>
#include"tableau.h"
#include"affichage.h"
#include"deplacement.h"
#include<stdlib.h>
/*deplacement.c*/
void deplacement(pile **tableau, int N, char *sel, int *tour)
......@@ -23,8 +24,9 @@ void deplacement(pile **tableau, int N, char *sel, int *tour)
printf("\nDéplacement non autorisé");
char c;
printf("\n");
//scanf("%1s",&c);
read(0,&c,1);//attend la touche entrer
scanf("%1s",&c);
fflush(stdin);
//read(0,&c,1);//attend la touche entrer
}
}
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter